Built motion from commit d5e4af8c.|2.6.23
[motion2.git] / server / api / squareRecording / squareRecording.rpc.js
index 2a7b51f..143e9e1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x78e2=['http','request','info','SquareRecording,\x20%s,\x20%s','request\x20sent','debug','SquareRecording,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','CreateSquareRecording','SquareRecording','create','body','options','raw','then','stringify','lodash','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client'];(function(_0x16de68,_0x33d7ff){var _0x1c277e=function(_0x1d8549){while(--_0x1d8549){_0x16de68['push'](_0x16de68['shift']());}};_0x1c277e(++_0x33d7ff);}(_0x78e2,0x1e4));var _0x278e=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x78e2[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x278e('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x278e('0x1'));var rs=require(_0x278e('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x278e('0x3'))['db'];var utils=require(_0x278e('0x4'));var logger=require(_0x278e('0x5'))(_0x278e('0x6'));var config=require(_0x278e('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x278e('0x8')][_0x278e('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x3a06cc,_0x49f8cc,_0x2cd12e){return new BPromise(function(_0x379398,_0x3cfa73){return client[_0x278e('0xa')](_0x3a06cc,_0x2cd12e)['then'](function(_0x2965ed){logger[_0x278e('0xb')](_0x278e('0xc'),_0x49f8cc,_0x278e('0xd'));logger[_0x278e('0xe')](_0x278e('0xf'),_0x49f8cc,_0x278e('0xd'),JSON['stringify'](_0x2965ed));if(_0x2965ed[_0x278e('0x10')]){if(_0x2965ed[_0x278e('0x10')][_0x278e('0x11')]===0x1f4){logger['error']('SquareRecording,\x20%s,\x20%s',_0x49f8cc,_0x2965ed[_0x278e('0x10')][_0x278e('0x12')]);return _0x3cfa73(_0x2965ed[_0x278e('0x10')][_0x278e('0x12')]);}logger['error']('SquareRecording,\x20%s,\x20%s',_0x49f8cc,_0x2965ed[_0x278e('0x10')][_0x278e('0x12')]);return _0x379398(_0x2965ed[_0x278e('0x10')]['message']);}else{logger[_0x278e('0xb')](_0x278e('0xc'),_0x49f8cc,_0x278e('0xd'));_0x379398(_0x2965ed[_0x278e('0x13')][_0x278e('0x12')]);}})[_0x278e('0x14')](function(_0x1dca0d){logger['error']('SquareRecording,\x20%s,\x20%s',_0x49f8cc,_0x1dca0d);_0x3cfa73(_0x1dca0d);});});}exports[_0x278e('0x15')]=function(_0x53a9d1){var _0x18ca3c=this;return new Promise(function(_0x2786f8,_0x19a7d2){return db[_0x278e('0x16')][_0x278e('0x17')](_0x53a9d1[_0x278e('0x18')],{'raw':_0x53a9d1[_0x278e('0x19')]?_0x53a9d1[_0x278e('0x19')][_0x278e('0x1a')]===undefined?!![]:![]:!![]})[_0x278e('0x1b')](function(_0x5a0f8b){logger['info'](_0x278e('0x15'),_0x53a9d1);logger[_0x278e('0xe')](_0x278e('0x15'),_0x53a9d1,JSON[_0x278e('0x1c')](_0x5a0f8b));_0x2786f8(_0x5a0f8b);})[_0x278e('0x14')](function(_0x1df4c6){logger[_0x278e('0x10')](_0x278e('0x15'),_0x1df4c6[_0x278e('0x12')],_0x53a9d1);_0x19a7d2(_0x18ca3c[_0x278e('0x10')](0x1f4,_0x1df4c6[_0x278e('0x12')]));});});};
\ No newline at end of file
+var _0x7773=['ioredis','../../mysqldb','../../config/utils','rpc','client','http','request','then','SquareRecording,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','info','result','catch','options','CreateSquareRecording','lodash','util','moment','bluebird'];(function(_0x3225cb,_0x178465){var _0xdb318=function(_0x3ae7b1){while(--_0x3ae7b1){_0x3225cb['push'](_0x3225cb['shift']());}};_0xdb318(++_0x178465);}(_0x7773,0x74));var _0x3777=function(_0x2641f9,_0x26715f){_0x2641f9=_0x2641f9-0x0;var _0x585741=_0x7773[_0x2641f9];return _0x585741;};'use strict';var _=require(_0x3777('0x0'));var util=require(_0x3777('0x1'));var moment=require(_0x3777('0x2'));var BPromise=require(_0x3777('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x3777('0x4'));var db=require(_0x3777('0x5'))['db'];var utils=require(_0x3777('0x6'));var logger=require('../../config/logger')(_0x3777('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x3777('0x8')][_0x3777('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x1612de,_0x5e2fa4,_0x2dac02){return new BPromise(function(_0x5c19df,_0x3b6fc7){return client[_0x3777('0xa')](_0x1612de,_0x2dac02)[_0x3777('0xb')](function(_0x28e2ad){logger['info'](_0x3777('0xc'),_0x5e2fa4,_0x3777('0xd'));logger[_0x3777('0xe')]('SquareRecording,\x20%s,\x20%s,\x20%s',_0x5e2fa4,_0x3777('0xd'),JSON[_0x3777('0xf')](_0x28e2ad));if(_0x28e2ad[_0x3777('0x10')]){if(_0x28e2ad[_0x3777('0x10')][_0x3777('0x11')]===0x1f4){logger['error'](_0x3777('0xc'),_0x5e2fa4,_0x28e2ad[_0x3777('0x10')][_0x3777('0x12')]);return _0x3b6fc7(_0x28e2ad[_0x3777('0x10')]['message']);}logger['error'](_0x3777('0xc'),_0x5e2fa4,_0x28e2ad[_0x3777('0x10')][_0x3777('0x12')]);return _0x5c19df(_0x28e2ad[_0x3777('0x10')][_0x3777('0x12')]);}else{logger[_0x3777('0x13')](_0x3777('0xc'),_0x5e2fa4,_0x3777('0xd'));_0x5c19df(_0x28e2ad[_0x3777('0x14')][_0x3777('0x12')]);}})[_0x3777('0x15')](function(_0x2ebfcc){logger[_0x3777('0x10')](_0x3777('0xc'),_0x5e2fa4,_0x2ebfcc);_0x3b6fc7(_0x2ebfcc);});});}exports['CreateSquareRecording']=function(_0x3c8166){var _0xf1f328=this;return new Promise(function(_0x37c3d4,_0x5898e1){return db['SquareRecording']['create'](_0x3c8166['body'],{'raw':_0x3c8166[_0x3777('0x16')]?_0x3c8166[_0x3777('0x16')]['raw']===undefined?!![]:![]:!![]})['then'](function(_0x1227ed){logger[_0x3777('0x13')]('CreateSquareRecording',_0x3c8166);logger[_0x3777('0xe')](_0x3777('0x17'),_0x3c8166,JSON[_0x3777('0xf')](_0x1227ed));_0x37c3d4(_0x1227ed);})[_0x3777('0x15')](function(_0x32e4f3){logger[_0x3777('0x10')](_0x3777('0x17'),_0x32e4f3['message'],_0x3c8166);_0x5898e1(_0xf1f328[_0x3777('0x10')](0x1f4,_0x32e4f3['message']));});});};
\ No newline at end of file