Built motion from commit (unavailable).|2.2.0
[motion2.git] / server / api / reportAgentPreview / reportAgentPreview.rpc.js
index 0d3634e..179be79 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0a05=['../../mysqldb','rpc','request','then','info','ReportAgentPreview,\x20%s,\x20%s','request\x20sent','debug','ReportAgentPreview,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','ReportAgentPreview','create','options','raw','CreateReportAgentPreview','util','randomstring','ioredis'];(function(_0x25ba51,_0x2ba7e8){var _0x1e5207=function(_0x45c779){while(--_0x45c779){_0x25ba51['push'](_0x25ba51['shift']());}};_0x1e5207(++_0x2ba7e8);}(_0x0a05,0x128));var _0x50a0=function(_0xb725be,_0x45bd01){_0xb725be=_0xb725be-0x0;var _0x2f2424=_0x0a05[_0xb725be];return _0x2f2424;};'use strict';var _=require('lodash');var util=require(_0x50a0('0x0'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x50a0('0x1'));var fs=require('fs');var Redis=require(_0x50a0('0x2'));var db=require(_0x50a0('0x3'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x50a0('0x4'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x5010c8,_0x523d28,_0x4be4ba){return new BPromise(function(_0x34bac1,_0xc9f0f7){return client[_0x50a0('0x5')](_0x5010c8,_0x4be4ba)[_0x50a0('0x6')](function(_0x2cf98b){logger[_0x50a0('0x7')](_0x50a0('0x8'),_0x523d28,_0x50a0('0x9'));logger[_0x50a0('0xa')](_0x50a0('0xb'),_0x523d28,_0x50a0('0x9'),JSON[_0x50a0('0xc')](_0x2cf98b));if(_0x2cf98b[_0x50a0('0xd')]){if(_0x2cf98b[_0x50a0('0xd')][_0x50a0('0xe')]===0x1f4){logger[_0x50a0('0xd')]('ReportAgentPreview,\x20%s,\x20%s',_0x523d28,_0x2cf98b['error'][_0x50a0('0xf')]);return _0xc9f0f7(_0x2cf98b[_0x50a0('0xd')][_0x50a0('0xf')]);}logger['error']('ReportAgentPreview,\x20%s,\x20%s',_0x523d28,_0x2cf98b[_0x50a0('0xd')][_0x50a0('0xf')]);return _0x34bac1(_0x2cf98b['error']['message']);}else{logger[_0x50a0('0x7')](_0x50a0('0x8'),_0x523d28,'request\x20sent');_0x34bac1(_0x2cf98b[_0x50a0('0x10')][_0x50a0('0xf')]);}})[_0x50a0('0x11')](function(_0x587faa){logger[_0x50a0('0xd')]('ReportAgentPreview,\x20%s,\x20%s',_0x523d28,_0x587faa);_0xc9f0f7(_0x587faa);});});}exports['CreateReportAgentPreview']=function(_0x291a3f){var _0x2daac7=this;return new Promise(function(_0x2da37c,_0x486849){return db[_0x50a0('0x12')][_0x50a0('0x13')](_0x291a3f['body'],{'raw':_0x291a3f[_0x50a0('0x14')]?_0x291a3f[_0x50a0('0x14')][_0x50a0('0x15')]===undefined?!![]:![]:!![]})[_0x50a0('0x6')](function(_0x5b86de){logger['info'](_0x50a0('0x16'),_0x291a3f);logger[_0x50a0('0xa')](_0x50a0('0x16'),_0x291a3f,JSON[_0x50a0('0xc')](_0x5b86de));_0x2da37c(_0x5b86de);})[_0x50a0('0x11')](function(_0x444072){logger[_0x50a0('0xd')](_0x50a0('0x16'),_0x444072['message'],_0x291a3f);_0x486849(_0x2daac7['error'](0x1f4,_0x444072[_0x50a0('0xf')]));});});};
\ No newline at end of file
+var _0x301f=['randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','then','ReportAgentPreview,\x20%s,\x20%s','debug','ReportAgentPreview,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','result','CreateReportAgentPreview','body','options','raw','catch','lodash','util','moment','bluebird'];(function(_0x533e1c,_0x39e3fd){var _0x2a7d6e=function(_0x558b25){while(--_0x558b25){_0x533e1c['push'](_0x533e1c['shift']());}};_0x2a7d6e(++_0x39e3fd);}(_0x301f,0xec));var _0xf301=function(_0x159a48,_0x4c757d){_0x159a48=_0x159a48-0x0;var _0xd617ad=_0x301f[_0x159a48];return _0xd617ad;};'use strict';var _=require(_0xf301('0x0'));var util=require(_0xf301('0x1'));var moment=require(_0xf301('0x2'));var BPromise=require(_0xf301('0x3'));var rs=require(_0xf301('0x4'));var fs=require('fs');var Redis=require(_0xf301('0x5'));var db=require(_0xf301('0x6'))['db'];var utils=require(_0xf301('0x7'));var logger=require(_0xf301('0x8'))(_0xf301('0x9'));var config=require(_0xf301('0xa'));var jayson=require(_0xf301('0xb'));var client=jayson[_0xf301('0xc')][_0xf301('0xd')]({'port':0x232a});function respondWithRpcPromise(_0x4eb87a,_0x55b66c,_0x53b442){return new BPromise(function(_0x17871f,_0x28ddb0){return client['request'](_0x4eb87a,_0x53b442)[_0xf301('0xe')](function(_0x2364aa){logger['info'](_0xf301('0xf'),_0x55b66c,'request\x20sent');logger[_0xf301('0x10')](_0xf301('0x11'),_0x55b66c,_0xf301('0x12'),JSON[_0xf301('0x13')](_0x2364aa));if(_0x2364aa[_0xf301('0x14')]){if(_0x2364aa[_0xf301('0x14')][_0xf301('0x15')]===0x1f4){logger[_0xf301('0x14')](_0xf301('0xf'),_0x55b66c,_0x2364aa[_0xf301('0x14')][_0xf301('0x16')]);return _0x28ddb0(_0x2364aa[_0xf301('0x14')][_0xf301('0x16')]);}logger['error']('ReportAgentPreview,\x20%s,\x20%s',_0x55b66c,_0x2364aa[_0xf301('0x14')][_0xf301('0x16')]);return _0x17871f(_0x2364aa[_0xf301('0x14')]['message']);}else{logger[_0xf301('0x17')](_0xf301('0xf'),_0x55b66c,_0xf301('0x12'));_0x17871f(_0x2364aa[_0xf301('0x18')]['message']);}})['catch'](function(_0x5e3c04){logger[_0xf301('0x14')](_0xf301('0xf'),_0x55b66c,_0x5e3c04);_0x28ddb0(_0x5e3c04);});});}exports[_0xf301('0x19')]=function(_0x51555f){var _0x2662ae=this;return new Promise(function(_0x50dcb3,_0x2624cd){return db['ReportAgentPreview']['create'](_0x51555f[_0xf301('0x1a')],{'raw':_0x51555f[_0xf301('0x1b')]?_0x51555f[_0xf301('0x1b')][_0xf301('0x1c')]===undefined?!![]:![]:!![]})[_0xf301('0xe')](function(_0x13d172){logger[_0xf301('0x17')](_0xf301('0x19'),_0x51555f);logger[_0xf301('0x10')](_0xf301('0x19'),_0x51555f,JSON[_0xf301('0x13')](_0x13d172));_0x50dcb3(_0x13d172);})[_0xf301('0x1d')](function(_0x393a13){logger[_0xf301('0x14')]('CreateReportAgentPreview',_0x393a13[_0xf301('0x16')],_0x51555f);_0x2624cd(_0x2662ae[_0xf301('0x14')](0x1f4,_0x393a13[_0xf301('0x16')]));});});};
\ No newline at end of file