Built motion from commit (unavailable).|2.4.0
[motion2.git] / server / api / reportAgentPreview / reportAgentPreview.rpc.js
index dee033d..d25fa06 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfa0b=['request\x20sent','ReportAgentPreview,\x20%s,\x20%s,\x20%s','stringify','error','code','ReportAgentPreview,\x20%s,\x20%s','message','result','catch','CreateReportAgentPreview','ReportAgentPreview','options','then','info','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request'];(function(_0x3bf36d,_0x271147){var _0x1dd0f3=function(_0x3a8204){while(--_0x3a8204){_0x3bf36d['push'](_0x3bf36d['shift']());}};_0x1dd0f3(++_0x271147);}(_0xfa0b,0x1a3));var _0xbfa0=function(_0x413aac,_0x5e2430){_0x413aac=_0x413aac-0x0;var _0x569b11=_0xfa0b[_0x413aac];return _0x569b11;};'use strict';var _=require(_0xbfa0('0x0'));var util=require(_0xbfa0('0x1'));var moment=require('moment');var BPromise=require(_0xbfa0('0x2'));var rs=require(_0xbfa0('0x3'));var fs=require('fs');var Redis=require(_0xbfa0('0x4'));var db=require(_0xbfa0('0x5'))['db'];var utils=require(_0xbfa0('0x6'));var logger=require(_0xbfa0('0x7'))(_0xbfa0('0x8'));var config=require(_0xbfa0('0x9'));var jayson=require('jayson/promise');var client=jayson[_0xbfa0('0xa')][_0xbfa0('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x37f9f8,_0x4aa8ed,_0xbff608){return new BPromise(function(_0x5c6f25,_0x5e2b7d){return client[_0xbfa0('0xc')](_0x37f9f8,_0xbff608)['then'](function(_0x593113){logger['info']('ReportAgentPreview,\x20%s,\x20%s',_0x4aa8ed,_0xbfa0('0xd'));logger['debug'](_0xbfa0('0xe'),_0x4aa8ed,_0xbfa0('0xd'),JSON[_0xbfa0('0xf')](_0x593113));if(_0x593113[_0xbfa0('0x10')]){if(_0x593113[_0xbfa0('0x10')][_0xbfa0('0x11')]===0x1f4){logger[_0xbfa0('0x10')](_0xbfa0('0x12'),_0x4aa8ed,_0x593113[_0xbfa0('0x10')][_0xbfa0('0x13')]);return _0x5e2b7d(_0x593113['error'][_0xbfa0('0x13')]);}logger[_0xbfa0('0x10')](_0xbfa0('0x12'),_0x4aa8ed,_0x593113[_0xbfa0('0x10')][_0xbfa0('0x13')]);return _0x5c6f25(_0x593113[_0xbfa0('0x10')][_0xbfa0('0x13')]);}else{logger['info']('ReportAgentPreview,\x20%s,\x20%s',_0x4aa8ed,_0xbfa0('0xd'));_0x5c6f25(_0x593113[_0xbfa0('0x14')][_0xbfa0('0x13')]);}})[_0xbfa0('0x15')](function(_0x46c81c){logger[_0xbfa0('0x10')]('ReportAgentPreview,\x20%s,\x20%s',_0x4aa8ed,_0x46c81c);_0x5e2b7d(_0x46c81c);});});}exports[_0xbfa0('0x16')]=function(_0x4ad7f4){var _0x5f50a3=this;return new Promise(function(_0xd543b,_0x49e6a3){return db[_0xbfa0('0x17')]['create'](_0x4ad7f4['body'],{'raw':_0x4ad7f4['options']?_0x4ad7f4[_0xbfa0('0x18')]['raw']===undefined?!![]:![]:!![]})[_0xbfa0('0x19')](function(_0x33829e){logger[_0xbfa0('0x1a')](_0xbfa0('0x16'),_0x4ad7f4);logger['debug'](_0xbfa0('0x16'),_0x4ad7f4,JSON['stringify'](_0x33829e));_0xd543b(_0x33829e);})[_0xbfa0('0x15')](function(_0x228103){logger[_0xbfa0('0x10')](_0xbfa0('0x16'),_0x228103[_0xbfa0('0x13')],_0x4ad7f4);_0x49e6a3(_0x5f50a3[_0xbfa0('0x10')](0x1f4,_0x228103[_0xbfa0('0x13')]));});});};
\ No newline at end of file
+var _0xc13b=['http','request','info','ReportAgentPreview,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','CreateReportAgentPreview','create','body','options','raw','then','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','client'];(function(_0x40d096,_0x195ff4){var _0x4f6f19=function(_0x14f6ee){while(--_0x14f6ee){_0x40d096['push'](_0x40d096['shift']());}};_0x4f6f19(++_0x195ff4);}(_0xc13b,0x120));var _0xbc13=function(_0x30ae5e,_0x391fc4){_0x30ae5e=_0x30ae5e-0x0;var _0x1f2e93=_0xc13b[_0x30ae5e];return _0x1f2e93;};'use strict';var _=require(_0xbc13('0x0'));var util=require(_0xbc13('0x1'));var moment=require(_0xbc13('0x2'));var BPromise=require('bluebird');var rs=require(_0xbc13('0x3'));var fs=require('fs');var Redis=require(_0xbc13('0x4'));var db=require(_0xbc13('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xbc13('0x6'))(_0xbc13('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xbc13('0x8')][_0xbc13('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x1419cd,_0x4b0032,_0x1e9002){return new BPromise(function(_0x2d9f98,_0x468fa9){return client[_0xbc13('0xa')](_0x1419cd,_0x1e9002)['then'](function(_0x51f7e7){logger[_0xbc13('0xb')](_0xbc13('0xc'),_0x4b0032,_0xbc13('0xd'));logger[_0xbc13('0xe')]('ReportAgentPreview,\x20%s,\x20%s,\x20%s',_0x4b0032,_0xbc13('0xd'),JSON[_0xbc13('0xf')](_0x51f7e7));if(_0x51f7e7[_0xbc13('0x10')]){if(_0x51f7e7['error'][_0xbc13('0x11')]===0x1f4){logger[_0xbc13('0x10')](_0xbc13('0xc'),_0x4b0032,_0x51f7e7[_0xbc13('0x10')][_0xbc13('0x12')]);return _0x468fa9(_0x51f7e7[_0xbc13('0x10')]['message']);}logger[_0xbc13('0x10')](_0xbc13('0xc'),_0x4b0032,_0x51f7e7['error']['message']);return _0x2d9f98(_0x51f7e7[_0xbc13('0x10')][_0xbc13('0x12')]);}else{logger[_0xbc13('0xb')](_0xbc13('0xc'),_0x4b0032,_0xbc13('0xd'));_0x2d9f98(_0x51f7e7[_0xbc13('0x13')][_0xbc13('0x12')]);}})[_0xbc13('0x14')](function(_0x218574){logger[_0xbc13('0x10')](_0xbc13('0xc'),_0x4b0032,_0x218574);_0x468fa9(_0x218574);});});}exports[_0xbc13('0x15')]=function(_0x3b97c7){var _0x3fe4fc=this;return new Promise(function(_0x525c21,_0x3f09bd){return db['ReportAgentPreview'][_0xbc13('0x16')](_0x3b97c7[_0xbc13('0x17')],{'raw':_0x3b97c7[_0xbc13('0x18')]?_0x3b97c7[_0xbc13('0x18')][_0xbc13('0x19')]===undefined?!![]:![]:!![]})[_0xbc13('0x1a')](function(_0x3685a2){logger[_0xbc13('0xb')]('CreateReportAgentPreview',_0x3b97c7);logger[_0xbc13('0xe')](_0xbc13('0x15'),_0x3b97c7,JSON[_0xbc13('0xf')](_0x3685a2));_0x525c21(_0x3685a2);})[_0xbc13('0x14')](function(_0x4c65c7){logger[_0xbc13('0x10')](_0xbc13('0x15'),_0x4c65c7[_0xbc13('0x12')],_0x3b97c7);_0x3f09bd(_0x3fe4fc[_0xbc13('0x10')](0x1f4,_0x4c65c7['message']));});});};
\ No newline at end of file