Built motion from commit 52c8a02d.|2.6.29
[motion2.git] / server / api / squareRecording / squareRecording.rpc.js
index 87edb6d..712de67 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6993=['../../config/environment','jayson/promise','client','http','request','info','SquareRecording,\x20%s,\x20%s','request\x20sent','debug','SquareRecording,\x20%s,\x20%s,\x20%s','stringify','error','message','CreateSquareRecording','create','body','options','then','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x2d5638,_0x48a18a){var _0x1960bd=function(_0x54ae0d){while(--_0x54ae0d){_0x2d5638['push'](_0x2d5638['shift']());}};_0x1960bd(++_0x48a18a);}(_0x6993,0x8f));var _0x3699=function(_0x3cb530,_0x170e8c){_0x3cb530=_0x3cb530-0x0;var _0x4168ea=_0x6993[_0x3cb530];return _0x4168ea;};'use strict';var _=require(_0x3699('0x0'));var util=require('util');var moment=require(_0x3699('0x1'));var BPromise=require(_0x3699('0x2'));var rs=require(_0x3699('0x3'));var fs=require('fs');var Redis=require(_0x3699('0x4'));var db=require(_0x3699('0x5'))['db'];var utils=require(_0x3699('0x6'));var logger=require('../../config/logger')('rpc');var config=require(_0x3699('0x7'));var jayson=require(_0x3699('0x8'));var client=jayson[_0x3699('0x9')][_0x3699('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x2b3a2c,_0x216ce7,_0x5e1c82){return new BPromise(function(_0x4334f9,_0x16dce9){return client[_0x3699('0xb')](_0x2b3a2c,_0x5e1c82)['then'](function(_0x5db459){logger[_0x3699('0xc')](_0x3699('0xd'),_0x216ce7,_0x3699('0xe'));logger[_0x3699('0xf')](_0x3699('0x10'),_0x216ce7,_0x3699('0xe'),JSON[_0x3699('0x11')](_0x5db459));if(_0x5db459[_0x3699('0x12')]){if(_0x5db459['error']['code']===0x1f4){logger[_0x3699('0x12')](_0x3699('0xd'),_0x216ce7,_0x5db459['error'][_0x3699('0x13')]);return _0x16dce9(_0x5db459[_0x3699('0x12')][_0x3699('0x13')]);}logger[_0x3699('0x12')]('SquareRecording,\x20%s,\x20%s',_0x216ce7,_0x5db459[_0x3699('0x12')][_0x3699('0x13')]);return _0x4334f9(_0x5db459['error'][_0x3699('0x13')]);}else{logger['info'](_0x3699('0xd'),_0x216ce7,_0x3699('0xe'));_0x4334f9(_0x5db459['result'][_0x3699('0x13')]);}})['catch'](function(_0x29252b){logger[_0x3699('0x12')](_0x3699('0xd'),_0x216ce7,_0x29252b);_0x16dce9(_0x29252b);});});}exports[_0x3699('0x14')]=function(_0x37a4fc){var _0x12f6d8=this;return new Promise(function(_0x361d7a,_0x260e65){return db['SquareRecording'][_0x3699('0x15')](_0x37a4fc[_0x3699('0x16')],{'raw':_0x37a4fc['options']?_0x37a4fc[_0x3699('0x17')]['raw']===undefined?!![]:![]:!![]})[_0x3699('0x18')](function(_0x2e0274){logger[_0x3699('0xc')](_0x3699('0x14'),_0x37a4fc);logger[_0x3699('0xf')](_0x3699('0x14'),_0x37a4fc,JSON[_0x3699('0x11')](_0x2e0274));_0x361d7a(_0x2e0274);})['catch'](function(_0x483317){logger[_0x3699('0x12')]('CreateSquareRecording',_0x483317[_0x3699('0x13')],_0x37a4fc);_0x260e65(_0x12f6d8['error'](0x1f4,_0x483317[_0x3699('0x13')]));});});};
\ No newline at end of file
+var _0xf975=['../../config/utils','rpc','client','http','request','then','info','SquareRecording,\x20%s,\x20%s','request\x20sent','debug','SquareRecording,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','CreateSquareRecording','SquareRecording','create','body','options','raw','catch','lodash','util','moment','bluebird','ioredis','../../mysqldb'];(function(_0x3477f4,_0x107091){var _0x5e1f5e=function(_0x25e73f){while(--_0x25e73f){_0x3477f4['push'](_0x3477f4['shift']());}};_0x5e1f5e(++_0x107091);}(_0xf975,0xa8));var _0x5f97=function(_0x2b0960,_0x525d1c){_0x2b0960=_0x2b0960-0x0;var _0x140c06=_0xf975[_0x2b0960];return _0x140c06;};'use strict';var _=require(_0x5f97('0x0'));var util=require(_0x5f97('0x1'));var moment=require(_0x5f97('0x2'));var BPromise=require(_0x5f97('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x5f97('0x4'));var db=require(_0x5f97('0x5'))['db'];var utils=require(_0x5f97('0x6'));var logger=require('../../config/logger')(_0x5f97('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x5f97('0x8')][_0x5f97('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x618d3d,_0x472911,_0x44e215){return new BPromise(function(_0x22d4d4,_0x1296a6){return client[_0x5f97('0xa')](_0x618d3d,_0x44e215)[_0x5f97('0xb')](function(_0x215c83){logger[_0x5f97('0xc')](_0x5f97('0xd'),_0x472911,_0x5f97('0xe'));logger[_0x5f97('0xf')](_0x5f97('0x10'),_0x472911,_0x5f97('0xe'),JSON[_0x5f97('0x11')](_0x215c83));if(_0x215c83[_0x5f97('0x12')]){if(_0x215c83['error'][_0x5f97('0x13')]===0x1f4){logger[_0x5f97('0x12')](_0x5f97('0xd'),_0x472911,_0x215c83[_0x5f97('0x12')][_0x5f97('0x14')]);return _0x1296a6(_0x215c83[_0x5f97('0x12')][_0x5f97('0x14')]);}logger[_0x5f97('0x12')](_0x5f97('0xd'),_0x472911,_0x215c83[_0x5f97('0x12')]['message']);return _0x22d4d4(_0x215c83[_0x5f97('0x12')]['message']);}else{logger[_0x5f97('0xc')]('SquareRecording,\x20%s,\x20%s',_0x472911,'request\x20sent');_0x22d4d4(_0x215c83[_0x5f97('0x15')][_0x5f97('0x14')]);}})['catch'](function(_0x12a057){logger[_0x5f97('0x12')](_0x5f97('0xd'),_0x472911,_0x12a057);_0x1296a6(_0x12a057);});});}exports[_0x5f97('0x16')]=function(_0x371c42){var _0x8333e8=this;return new Promise(function(_0x4a01c2,_0x470976){return db[_0x5f97('0x17')][_0x5f97('0x18')](_0x371c42[_0x5f97('0x19')],{'raw':_0x371c42[_0x5f97('0x1a')]?_0x371c42[_0x5f97('0x1a')][_0x5f97('0x1b')]===undefined?!![]:![]:!![]})['then'](function(_0x129e6a){logger[_0x5f97('0xc')](_0x5f97('0x16'),_0x371c42);logger[_0x5f97('0xf')](_0x5f97('0x16'),_0x371c42,JSON[_0x5f97('0x11')](_0x129e6a));_0x4a01c2(_0x129e6a);})[_0x5f97('0x1c')](function(_0x36e021){logger[_0x5f97('0x12')]('CreateSquareRecording',_0x36e021[_0x5f97('0x14')],_0x371c42);_0x470976(_0x8333e8['error'](0x1f4,_0x36e021[_0x5f97('0x14')]));});});};
\ No newline at end of file