Built motion from commit (unavailable).|2.5.7
[motion2.git] / server / api / squareRecording / squareRecording.rpc.js
index 3bcade9..9535ea3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1c2b=['SquareRecording,\x20%s,\x20%s,\x20%s','stringify','error','message','result','CreateSquareRecording','SquareRecording','create','body','options','raw','lodash','bluebird','randomstring','ioredis','../../mysqldb','rpc','../../config/environment','jayson/promise','client','request','then','info','SquareRecording,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x4d2842,_0x9fefa0){var _0x122e4f=function(_0x3bbf9f){while(--_0x3bbf9f){_0x4d2842['push'](_0x4d2842['shift']());}};_0x122e4f(++_0x9fefa0);}(_0x1c2b,0x191));var _0xb1c2=function(_0x817d9b,_0x3c37e3){_0x817d9b=_0x817d9b-0x0;var _0x2752e1=_0x1c2b[_0x817d9b];return _0x2752e1;};'use strict';var _=require(_0xb1c2('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xb1c2('0x1'));var rs=require(_0xb1c2('0x2'));var fs=require('fs');var Redis=require(_0xb1c2('0x3'));var db=require(_0xb1c2('0x4'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xb1c2('0x5'));var config=require(_0xb1c2('0x6'));var jayson=require(_0xb1c2('0x7'));var client=jayson[_0xb1c2('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x33ae37,_0x212883,_0x186494){return new BPromise(function(_0x42a496,_0x5b4bf5){return client[_0xb1c2('0x9')](_0x33ae37,_0x186494)[_0xb1c2('0xa')](function(_0x5d6e59){logger[_0xb1c2('0xb')](_0xb1c2('0xc'),_0x212883,_0xb1c2('0xd'));logger[_0xb1c2('0xe')](_0xb1c2('0xf'),_0x212883,_0xb1c2('0xd'),JSON[_0xb1c2('0x10')](_0x5d6e59));if(_0x5d6e59[_0xb1c2('0x11')]){if(_0x5d6e59['error']['code']===0x1f4){logger[_0xb1c2('0x11')](_0xb1c2('0xc'),_0x212883,_0x5d6e59['error'][_0xb1c2('0x12')]);return _0x5b4bf5(_0x5d6e59[_0xb1c2('0x11')]['message']);}logger['error']('SquareRecording,\x20%s,\x20%s',_0x212883,_0x5d6e59[_0xb1c2('0x11')][_0xb1c2('0x12')]);return _0x42a496(_0x5d6e59['error'][_0xb1c2('0x12')]);}else{logger['info'](_0xb1c2('0xc'),_0x212883,_0xb1c2('0xd'));_0x42a496(_0x5d6e59[_0xb1c2('0x13')]['message']);}})['catch'](function(_0x3efeb6){logger[_0xb1c2('0x11')]('SquareRecording,\x20%s,\x20%s',_0x212883,_0x3efeb6);_0x5b4bf5(_0x3efeb6);});});}exports[_0xb1c2('0x14')]=function(_0x4d5026){var _0x171a16=this;return new Promise(function(_0x6d37c4,_0x328f9f){return db[_0xb1c2('0x15')][_0xb1c2('0x16')](_0x4d5026[_0xb1c2('0x17')],{'raw':_0x4d5026['options']?_0x4d5026[_0xb1c2('0x18')][_0xb1c2('0x19')]===undefined?!![]:![]:!![]})[_0xb1c2('0xa')](function(_0x4c6057){logger[_0xb1c2('0xb')]('CreateSquareRecording',_0x4d5026);logger[_0xb1c2('0xe')](_0xb1c2('0x14'),_0x4d5026,JSON[_0xb1c2('0x10')](_0x4c6057));_0x6d37c4(_0x4c6057);})['catch'](function(_0xe91501){logger['error'](_0xb1c2('0x14'),_0xe91501['message'],_0x4d5026);_0x328f9f(_0x171a16['error'](0x1f4,_0xe91501[_0xb1c2('0x12')]));});});};
\ No newline at end of file
+var _0x30b7=['request\x20sent','SquareRecording,\x20%s,\x20%s,\x20%s','stringify','error','code','message','CreateSquareRecording','create','body','options','raw','debug','catch','util','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','info','SquareRecording,\x20%s,\x20%s'];(function(_0x4e02a2,_0xda965b){var _0xef9b03=function(_0xa0f5f2){while(--_0xa0f5f2){_0x4e02a2['push'](_0x4e02a2['shift']());}};_0xef9b03(++_0xda965b);}(_0x30b7,0xe5));var _0x730b=function(_0x23376a,_0x1fea7b){_0x23376a=_0x23376a-0x0;var _0x267ec3=_0x30b7[_0x23376a];return _0x267ec3;};'use strict';var _=require('lodash');var util=require(_0x730b('0x0'));var moment=require('moment');var BPromise=require(_0x730b('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x730b('0x2'));var db=require(_0x730b('0x3'))['db'];var utils=require(_0x730b('0x4'));var logger=require(_0x730b('0x5'))(_0x730b('0x6'));var config=require(_0x730b('0x7'));var jayson=require(_0x730b('0x8'));var client=jayson[_0x730b('0x9')][_0x730b('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x558309,_0x3a9ab3,_0x4e0ebb){return new BPromise(function(_0xf2f30e,_0x5d1be0){return client[_0x730b('0xb')](_0x558309,_0x4e0ebb)['then'](function(_0x3588e7){logger[_0x730b('0xc')](_0x730b('0xd'),_0x3a9ab3,_0x730b('0xe'));logger['debug'](_0x730b('0xf'),_0x3a9ab3,_0x730b('0xe'),JSON[_0x730b('0x10')](_0x3588e7));if(_0x3588e7[_0x730b('0x11')]){if(_0x3588e7[_0x730b('0x11')][_0x730b('0x12')]===0x1f4){logger[_0x730b('0x11')](_0x730b('0xd'),_0x3a9ab3,_0x3588e7[_0x730b('0x11')][_0x730b('0x13')]);return _0x5d1be0(_0x3588e7['error']['message']);}logger[_0x730b('0x11')](_0x730b('0xd'),_0x3a9ab3,_0x3588e7['error'][_0x730b('0x13')]);return _0xf2f30e(_0x3588e7[_0x730b('0x11')][_0x730b('0x13')]);}else{logger[_0x730b('0xc')](_0x730b('0xd'),_0x3a9ab3,_0x730b('0xe'));_0xf2f30e(_0x3588e7['result'][_0x730b('0x13')]);}})['catch'](function(_0x2923d4){logger['error'](_0x730b('0xd'),_0x3a9ab3,_0x2923d4);_0x5d1be0(_0x2923d4);});});}exports[_0x730b('0x14')]=function(_0x19e049){var _0x3e1143=this;return new Promise(function(_0x5270db,_0x14c2da){return db['SquareRecording'][_0x730b('0x15')](_0x19e049[_0x730b('0x16')],{'raw':_0x19e049[_0x730b('0x17')]?_0x19e049[_0x730b('0x17')][_0x730b('0x18')]===undefined?!![]:![]:!![]})['then'](function(_0x5b219a){logger[_0x730b('0xc')](_0x730b('0x14'),_0x19e049);logger[_0x730b('0x19')](_0x730b('0x14'),_0x19e049,JSON['stringify'](_0x5b219a));_0x5270db(_0x5b219a);})[_0x730b('0x1a')](function(_0x4e56f3){logger[_0x730b('0x11')](_0x730b('0x14'),_0x4e56f3[_0x730b('0x13')],_0x19e049);_0x14c2da(_0x3e1143[_0x730b('0x11')](0x1f4,_0x4e56f3[_0x730b('0x13')]));});});};
\ No newline at end of file