Built motion from commit (unavailable).|2.3.97
[motion2.git] / server / api / reportAgentPreview / reportAgentPreview.rpc.js
index 457cfba..3060a37 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x055b=['jayson/promise','http','info','ReportAgentPreview,\x20%s,\x20%s','request\x20sent','ReportAgentPreview,\x20%s,\x20%s,\x20%s','error','message','result','catch','CreateReportAgentPreview','create','body','options','raw','then','debug','stringify','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc'];(function(_0x2869f8,_0x9756fb){var _0x2a9fe6=function(_0x18c01a){while(--_0x18c01a){_0x2869f8['push'](_0x2869f8['shift']());}};_0x2a9fe6(++_0x9756fb);}(_0x055b,0xe2));var _0xb055=function(_0x1ff730,_0x5e0387){_0x1ff730=_0x1ff730-0x0;var _0xe84d1a=_0x055b[_0x1ff730];return _0xe84d1a;};'use strict';var _=require('lodash');var util=require(_0xb055('0x0'));var moment=require(_0xb055('0x1'));var BPromise=require(_0xb055('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xb055('0x3'));var db=require(_0xb055('0x4'))['db'];var utils=require(_0xb055('0x5'));var logger=require(_0xb055('0x6'))(_0xb055('0x7'));var config=require('../../config/environment');var jayson=require(_0xb055('0x8'));var client=jayson['client'][_0xb055('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x1fb2b4,_0x49cd09,_0x186162){return new BPromise(function(_0x519632,_0x1d2fa2){return client['request'](_0x1fb2b4,_0x186162)['then'](function(_0x35997c){logger[_0xb055('0xa')](_0xb055('0xb'),_0x49cd09,_0xb055('0xc'));logger['debug'](_0xb055('0xd'),_0x49cd09,'request\x20sent',JSON['stringify'](_0x35997c));if(_0x35997c[_0xb055('0xe')]){if(_0x35997c[_0xb055('0xe')]['code']===0x1f4){logger['error'](_0xb055('0xb'),_0x49cd09,_0x35997c[_0xb055('0xe')][_0xb055('0xf')]);return _0x1d2fa2(_0x35997c[_0xb055('0xe')][_0xb055('0xf')]);}logger[_0xb055('0xe')]('ReportAgentPreview,\x20%s,\x20%s',_0x49cd09,_0x35997c['error']['message']);return _0x519632(_0x35997c[_0xb055('0xe')][_0xb055('0xf')]);}else{logger[_0xb055('0xa')](_0xb055('0xb'),_0x49cd09,'request\x20sent');_0x519632(_0x35997c[_0xb055('0x10')]['message']);}})[_0xb055('0x11')](function(_0xf0be2e){logger['error'](_0xb055('0xb'),_0x49cd09,_0xf0be2e);_0x1d2fa2(_0xf0be2e);});});}exports[_0xb055('0x12')]=function(_0x2f2e6c){var _0x189f5f=this;return new Promise(function(_0x2a58ec,_0x466368){return db['ReportAgentPreview'][_0xb055('0x13')](_0x2f2e6c[_0xb055('0x14')],{'raw':_0x2f2e6c[_0xb055('0x15')]?_0x2f2e6c['options'][_0xb055('0x16')]===undefined?!![]:![]:!![]})[_0xb055('0x17')](function(_0x3cb2ae){logger[_0xb055('0xa')](_0xb055('0x12'),_0x2f2e6c);logger[_0xb055('0x18')](_0xb055('0x12'),_0x2f2e6c,JSON[_0xb055('0x19')](_0x3cb2ae));_0x2a58ec(_0x3cb2ae);})['catch'](function(_0x4f58bc){logger[_0xb055('0xe')](_0xb055('0x12'),_0x4f58bc[_0xb055('0xf')],_0x2f2e6c);_0x466368(_0x189f5f['error'](0x1f4,_0x4f58bc['message']));});});};
\ No newline at end of file
+var _0x218f=['result','catch','CreateReportAgentPreview','ReportAgentPreview','body','options','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','client','http','request','then','ReportAgentPreview,\x20%s,\x20%s','debug','ReportAgentPreview,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','request\x20sent'];(function(_0x2191bf,_0xa3ac87){var _0x5a6bd3=function(_0x3c03b9){while(--_0x3c03b9){_0x2191bf['push'](_0x2191bf['shift']());}};_0x5a6bd3(++_0xa3ac87);}(_0x218f,0xa8));var _0xf218=function(_0x346443,_0x33dbf9){_0x346443=_0x346443-0x0;var _0x498ca0=_0x218f[_0x346443];return _0x498ca0;};'use strict';var _=require(_0xf218('0x0'));var util=require(_0xf218('0x1'));var moment=require('moment');var BPromise=require(_0xf218('0x2'));var rs=require(_0xf218('0x3'));var fs=require('fs');var Redis=require(_0xf218('0x4'));var db=require(_0xf218('0x5'))['db'];var utils=require(_0xf218('0x6'));var logger=require(_0xf218('0x7'))('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xf218('0x8')][_0xf218('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x8c0279,_0x37a853,_0xcf0312){return new BPromise(function(_0x4bb9ef,_0x333cbe){return client[_0xf218('0xa')](_0x8c0279,_0xcf0312)[_0xf218('0xb')](function(_0x369473){logger['info'](_0xf218('0xc'),_0x37a853,'request\x20sent');logger[_0xf218('0xd')](_0xf218('0xe'),_0x37a853,'request\x20sent',JSON[_0xf218('0xf')](_0x369473));if(_0x369473['error']){if(_0x369473[_0xf218('0x10')][_0xf218('0x11')]===0x1f4){logger[_0xf218('0x10')](_0xf218('0xc'),_0x37a853,_0x369473[_0xf218('0x10')][_0xf218('0x12')]);return _0x333cbe(_0x369473[_0xf218('0x10')][_0xf218('0x12')]);}logger['error'](_0xf218('0xc'),_0x37a853,_0x369473[_0xf218('0x10')][_0xf218('0x12')]);return _0x4bb9ef(_0x369473[_0xf218('0x10')][_0xf218('0x12')]);}else{logger[_0xf218('0x13')](_0xf218('0xc'),_0x37a853,_0xf218('0x14'));_0x4bb9ef(_0x369473[_0xf218('0x15')][_0xf218('0x12')]);}})[_0xf218('0x16')](function(_0x37edb4){logger[_0xf218('0x10')](_0xf218('0xc'),_0x37a853,_0x37edb4);_0x333cbe(_0x37edb4);});});}exports[_0xf218('0x17')]=function(_0x4c0604){var _0x1c0ead=this;return new Promise(function(_0x4e3e35,_0xe00a4c){return db[_0xf218('0x18')]['create'](_0x4c0604[_0xf218('0x19')],{'raw':_0x4c0604[_0xf218('0x1a')]?_0x4c0604[_0xf218('0x1a')]['raw']===undefined?!![]:![]:!![]})[_0xf218('0xb')](function(_0x36f54e){logger[_0xf218('0x13')](_0xf218('0x17'),_0x4c0604);logger[_0xf218('0xd')]('CreateReportAgentPreview',_0x4c0604,JSON[_0xf218('0xf')](_0x36f54e));_0x4e3e35(_0x36f54e);})[_0xf218('0x16')](function(_0x3a98a0){logger['error'](_0xf218('0x17'),_0x3a98a0[_0xf218('0x12')],_0x4c0604);_0xe00a4c(_0x1c0ead[_0xf218('0x10')](0x1f4,_0x3a98a0[_0xf218('0x12')]));});});};
\ No newline at end of file