Built motion from commit 3c2ce842.|2.6.31
[motion2.git] / server / api / reportAgentPreview / reportAgentPreview.rpc.js
index ff55a11..d778832 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x676a=['raw','CreateReportAgentPreview','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','jayson/promise','client','http','request','info','ReportAgentPreview,\x20%s,\x20%s','debug','request\x20sent','stringify','error','code','message','result','catch','ReportAgentPreview','options'];(function(_0x3d9287,_0x12b2f1){var _0x28e30d=function(_0xb18d29){while(--_0xb18d29){_0x3d9287['push'](_0x3d9287['shift']());}};_0x28e30d(++_0x12b2f1);}(_0x676a,0x1dd));var _0xa676=function(_0x4e1d03,_0x786f3a){_0x4e1d03=_0x4e1d03-0x0;var _0x362d4b=_0x676a[_0x4e1d03];return _0x362d4b;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xa676('0x0'));var BPromise=require(_0xa676('0x1'));var rs=require(_0xa676('0x2'));var fs=require('fs');var Redis=require(_0xa676('0x3'));var db=require(_0xa676('0x4'))['db'];var utils=require(_0xa676('0x5'));var logger=require('../../config/logger')(_0xa676('0x6'));var config=require('../../config/environment');var jayson=require(_0xa676('0x7'));var client=jayson[_0xa676('0x8')][_0xa676('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x31e081,_0x21791c,_0x4375e0){return new BPromise(function(_0x513c5c,_0x1f5472){return client[_0xa676('0xa')](_0x31e081,_0x4375e0)['then'](function(_0x25412e){logger[_0xa676('0xb')](_0xa676('0xc'),_0x21791c,'request\x20sent');logger[_0xa676('0xd')]('ReportAgentPreview,\x20%s,\x20%s,\x20%s',_0x21791c,_0xa676('0xe'),JSON[_0xa676('0xf')](_0x25412e));if(_0x25412e[_0xa676('0x10')]){if(_0x25412e[_0xa676('0x10')][_0xa676('0x11')]===0x1f4){logger[_0xa676('0x10')](_0xa676('0xc'),_0x21791c,_0x25412e[_0xa676('0x10')][_0xa676('0x12')]);return _0x1f5472(_0x25412e[_0xa676('0x10')][_0xa676('0x12')]);}logger[_0xa676('0x10')](_0xa676('0xc'),_0x21791c,_0x25412e['error'][_0xa676('0x12')]);return _0x513c5c(_0x25412e[_0xa676('0x10')][_0xa676('0x12')]);}else{logger[_0xa676('0xb')](_0xa676('0xc'),_0x21791c,_0xa676('0xe'));_0x513c5c(_0x25412e[_0xa676('0x13')][_0xa676('0x12')]);}})[_0xa676('0x14')](function(_0x278692){logger['error']('ReportAgentPreview,\x20%s,\x20%s',_0x21791c,_0x278692);_0x1f5472(_0x278692);});});}exports['CreateReportAgentPreview']=function(_0x252d3a){var _0x3dc270=this;return new Promise(function(_0x553b3b,_0x2c22ce){return db[_0xa676('0x15')]['create'](_0x252d3a['body'],{'raw':_0x252d3a[_0xa676('0x16')]?_0x252d3a[_0xa676('0x16')][_0xa676('0x17')]===undefined?!![]:![]:!![]})['then'](function(_0x2b71ae){logger[_0xa676('0xb')](_0xa676('0x18'),_0x252d3a);logger[_0xa676('0xd')](_0xa676('0x18'),_0x252d3a,JSON[_0xa676('0xf')](_0x2b71ae));_0x553b3b(_0x2b71ae);})['catch'](function(_0x14120b){logger[_0xa676('0x10')](_0xa676('0x18'),_0x14120b[_0xa676('0x12')],_0x252d3a);_0x2c22ce(_0x3dc270[_0xa676('0x10')](0x1f4,_0x14120b[_0xa676('0x12')]));});});};
\ No newline at end of file
+var _0x3506=['debug','ReportAgentPreview,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','ReportAgentPreview','body','options','raw','CreateReportAgentPreview','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','ReportAgentPreview,\x20%s,\x20%s'];(function(_0x48c7c2,_0x57cfd5){var _0x2038b5=function(_0x5cdd9e){while(--_0x5cdd9e){_0x48c7c2['push'](_0x48c7c2['shift']());}};_0x2038b5(++_0x57cfd5);}(_0x3506,0x86));var _0x6350=function(_0x31fde6,_0x2428dc){_0x31fde6=_0x31fde6-0x0;var _0x168b3e=_0x3506[_0x31fde6];return _0x168b3e;};'use strict';var _=require(_0x6350('0x0'));var util=require('util');var moment=require(_0x6350('0x1'));var BPromise=require(_0x6350('0x2'));var rs=require(_0x6350('0x3'));var fs=require('fs');var Redis=require(_0x6350('0x4'));var db=require(_0x6350('0x5'))['db'];var utils=require(_0x6350('0x6'));var logger=require(_0x6350('0x7'))(_0x6350('0x8'));var config=require(_0x6350('0x9'));var jayson=require(_0x6350('0xa'));var client=jayson['client'][_0x6350('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x1d46bb,_0x4883d9,_0x2815f8){return new BPromise(function(_0x164bf2,_0x50cc9b){return client[_0x6350('0xc')](_0x1d46bb,_0x2815f8)[_0x6350('0xd')](function(_0x3a2766){logger[_0x6350('0xe')](_0x6350('0xf'),_0x4883d9,'request\x20sent');logger[_0x6350('0x10')](_0x6350('0x11'),_0x4883d9,_0x6350('0x12'),JSON[_0x6350('0x13')](_0x3a2766));if(_0x3a2766[_0x6350('0x14')]){if(_0x3a2766[_0x6350('0x14')][_0x6350('0x15')]===0x1f4){logger[_0x6350('0x14')](_0x6350('0xf'),_0x4883d9,_0x3a2766[_0x6350('0x14')]['message']);return _0x50cc9b(_0x3a2766['error']['message']);}logger[_0x6350('0x14')](_0x6350('0xf'),_0x4883d9,_0x3a2766[_0x6350('0x14')][_0x6350('0x16')]);return _0x164bf2(_0x3a2766[_0x6350('0x14')][_0x6350('0x16')]);}else{logger['info']('ReportAgentPreview,\x20%s,\x20%s',_0x4883d9,_0x6350('0x12'));_0x164bf2(_0x3a2766[_0x6350('0x17')][_0x6350('0x16')]);}})[_0x6350('0x18')](function(_0x50846e){logger[_0x6350('0x14')]('ReportAgentPreview,\x20%s,\x20%s',_0x4883d9,_0x50846e);_0x50cc9b(_0x50846e);});});}exports['CreateReportAgentPreview']=function(_0x408a9d){var _0x1754b5=this;return new Promise(function(_0x4305e2,_0x27f2e6){return db[_0x6350('0x19')]['create'](_0x408a9d[_0x6350('0x1a')],{'raw':_0x408a9d[_0x6350('0x1b')]?_0x408a9d[_0x6350('0x1b')][_0x6350('0x1c')]===undefined?!![]:![]:!![]})[_0x6350('0xd')](function(_0x5bc44c){logger[_0x6350('0xe')](_0x6350('0x1d'),_0x408a9d);logger[_0x6350('0x10')](_0x6350('0x1d'),_0x408a9d,JSON[_0x6350('0x13')](_0x5bc44c));_0x4305e2(_0x5bc44c);})[_0x6350('0x18')](function(_0x119313){logger['error']('CreateReportAgentPreview',_0x119313[_0x6350('0x16')],_0x408a9d);_0x27f2e6(_0x1754b5[_0x6350('0x14')](0x1f4,_0x119313['message']));});});};
\ No newline at end of file