Built motion from commit (unavailable).|2.5.17
[motion2.git] / server / api / reportAgentPreview / reportAgentPreview.rpc.js
index 985602b..6035d7d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5e77=['options','raw','then','lodash','util','moment','bluebird','randomstring','../../config/logger','../../config/environment','client','info','ReportAgentPreview,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','catch','CreateReportAgentPreview','create','body'];(function(_0x36a8b8,_0x59d96c){var _0x539463=function(_0x11209d){while(--_0x11209d){_0x36a8b8['push'](_0x36a8b8['shift']());}};_0x539463(++_0x59d96c);}(_0x5e77,0x100));var _0x75e7=function(_0x49225d,_0x312d6c){_0x49225d=_0x49225d-0x0;var _0x2c228f=_0x5e77[_0x49225d];return _0x2c228f;};'use strict';var _=require(_0x75e7('0x0'));var util=require(_0x75e7('0x1'));var moment=require(_0x75e7('0x2'));var BPromise=require(_0x75e7('0x3'));var rs=require(_0x75e7('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x75e7('0x5'))('rpc');var config=require(_0x75e7('0x6'));var jayson=require('jayson/promise');var client=jayson[_0x75e7('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0x412366,_0x36113b,_0x40bb35){return new BPromise(function(_0xbf8d7f,_0x59ea15){return client['request'](_0x412366,_0x40bb35)['then'](function(_0x463643){logger[_0x75e7('0x8')](_0x75e7('0x9'),_0x36113b,_0x75e7('0xa'));logger[_0x75e7('0xb')]('ReportAgentPreview,\x20%s,\x20%s,\x20%s',_0x36113b,'request\x20sent',JSON[_0x75e7('0xc')](_0x463643));if(_0x463643[_0x75e7('0xd')]){if(_0x463643[_0x75e7('0xd')][_0x75e7('0xe')]===0x1f4){logger[_0x75e7('0xd')](_0x75e7('0x9'),_0x36113b,_0x463643[_0x75e7('0xd')]['message']);return _0x59ea15(_0x463643[_0x75e7('0xd')][_0x75e7('0xf')]);}logger[_0x75e7('0xd')](_0x75e7('0x9'),_0x36113b,_0x463643['error'][_0x75e7('0xf')]);return _0xbf8d7f(_0x463643[_0x75e7('0xd')]['message']);}else{logger[_0x75e7('0x8')]('ReportAgentPreview,\x20%s,\x20%s',_0x36113b,_0x75e7('0xa'));_0xbf8d7f(_0x463643['result'][_0x75e7('0xf')]);}})[_0x75e7('0x10')](function(_0x191b2c){logger['error'](_0x75e7('0x9'),_0x36113b,_0x191b2c);_0x59ea15(_0x191b2c);});});}exports[_0x75e7('0x11')]=function(_0x4a5d93){var _0x339fc2=this;return new Promise(function(_0x3453a7,_0x103162){return db['ReportAgentPreview'][_0x75e7('0x12')](_0x4a5d93[_0x75e7('0x13')],{'raw':_0x4a5d93['options']?_0x4a5d93[_0x75e7('0x14')][_0x75e7('0x15')]===undefined?!![]:![]:!![]})[_0x75e7('0x16')](function(_0x41c24c){logger[_0x75e7('0x8')](_0x75e7('0x11'),_0x4a5d93);logger['debug']('CreateReportAgentPreview',_0x4a5d93,JSON[_0x75e7('0xc')](_0x41c24c));_0x3453a7(_0x41c24c);})[_0x75e7('0x10')](function(_0xd24bd4){logger[_0x75e7('0xd')](_0x75e7('0x11'),_0xd24bd4[_0x75e7('0xf')],_0x4a5d93);_0x103162(_0x339fc2['error'](0x1f4,_0xd24bd4[_0x75e7('0xf')]));});});};
\ No newline at end of file
+var _0x56fa=['../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','ReportAgentPreview,\x20%s,\x20%s','request\x20sent','debug','ReportAgentPreview,\x20%s,\x20%s,\x20%s','error','code','message','info','result','ReportAgentPreview','create','body','options','raw','then','CreateReportAgentPreview','catch','lodash','util','moment','bluebird','randomstring','ioredis'];(function(_0x10e05f,_0x532dfc){var _0x597022=function(_0x4a69f0){while(--_0x4a69f0){_0x10e05f['push'](_0x10e05f['shift']());}};_0x597022(++_0x532dfc);}(_0x56fa,0xf6));var _0xa56f=function(_0x5e5218,_0x4226ef){_0x5e5218=_0x5e5218-0x0;var _0x2dcd35=_0x56fa[_0x5e5218];return _0x2dcd35;};'use strict';var _=require(_0xa56f('0x0'));var util=require(_0xa56f('0x1'));var moment=require(_0xa56f('0x2'));var BPromise=require(_0xa56f('0x3'));var rs=require(_0xa56f('0x4'));var fs=require('fs');var Redis=require(_0xa56f('0x5'));var db=require(_0xa56f('0x6'))['db'];var utils=require(_0xa56f('0x7'));var logger=require(_0xa56f('0x8'))(_0xa56f('0x9'));var config=require('../../config/environment');var jayson=require(_0xa56f('0xa'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x3ccecf,_0x354d42,_0x375d26){return new BPromise(function(_0x204ec5,_0x3d111a){return client['request'](_0x3ccecf,_0x375d26)['then'](function(_0x3c66c6){logger['info'](_0xa56f('0xb'),_0x354d42,_0xa56f('0xc'));logger[_0xa56f('0xd')](_0xa56f('0xe'),_0x354d42,_0xa56f('0xc'),JSON['stringify'](_0x3c66c6));if(_0x3c66c6[_0xa56f('0xf')]){if(_0x3c66c6['error'][_0xa56f('0x10')]===0x1f4){logger[_0xa56f('0xf')](_0xa56f('0xb'),_0x354d42,_0x3c66c6[_0xa56f('0xf')]['message']);return _0x3d111a(_0x3c66c6[_0xa56f('0xf')][_0xa56f('0x11')]);}logger[_0xa56f('0xf')](_0xa56f('0xb'),_0x354d42,_0x3c66c6['error'][_0xa56f('0x11')]);return _0x204ec5(_0x3c66c6[_0xa56f('0xf')][_0xa56f('0x11')]);}else{logger[_0xa56f('0x12')](_0xa56f('0xb'),_0x354d42,_0xa56f('0xc'));_0x204ec5(_0x3c66c6[_0xa56f('0x13')][_0xa56f('0x11')]);}})['catch'](function(_0x5ecc6f){logger['error'](_0xa56f('0xb'),_0x354d42,_0x5ecc6f);_0x3d111a(_0x5ecc6f);});});}exports['CreateReportAgentPreview']=function(_0x1d2573){var _0x1d747f=this;return new Promise(function(_0x1c3214,_0x484a14){return db[_0xa56f('0x14')][_0xa56f('0x15')](_0x1d2573[_0xa56f('0x16')],{'raw':_0x1d2573[_0xa56f('0x17')]?_0x1d2573[_0xa56f('0x17')][_0xa56f('0x18')]===undefined?!![]:![]:!![]})[_0xa56f('0x19')](function(_0x43d25f){logger[_0xa56f('0x12')](_0xa56f('0x1a'),_0x1d2573);logger[_0xa56f('0xd')](_0xa56f('0x1a'),_0x1d2573,JSON['stringify'](_0x43d25f));_0x1c3214(_0x43d25f);})[_0xa56f('0x1b')](function(_0x5285ff){logger['error'](_0xa56f('0x1a'),_0x5285ff[_0xa56f('0x11')],_0x1d2573);_0x484a14(_0x1d747f[_0xa56f('0xf')](0x1f4,_0x5285ff[_0xa56f('0x11')]));});});};
\ No newline at end of file