Built motion from commit 3c2ce842.|2.6.31
[motion2.git] / server / api / reportAgentPreview / reportAgentPreview.rpc.js
index d778832..9009c4c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-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
+var _0x334f=['options','raw','CreateReportAgentPreview','stringify','util','moment','bluebird','randomstring','../../mysqldb','../../config/logger','../../config/environment','jayson/promise','http','then','info','ReportAgentPreview,\x20%s,\x20%s','debug','ReportAgentPreview,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','catch','ReportAgentPreview','create','body'];(function(_0x573808,_0x44d1ca){var _0x295fd1=function(_0x47b9b4){while(--_0x47b9b4){_0x573808['push'](_0x573808['shift']());}};_0x295fd1(++_0x44d1ca);}(_0x334f,0x18a));var _0xf334=function(_0x1a4b2c,_0x3d2784){_0x1a4b2c=_0x1a4b2c-0x0;var _0xb457f=_0x334f[_0x1a4b2c];return _0xb457f;};'use strict';var _=require('lodash');var util=require(_0xf334('0x0'));var moment=require(_0xf334('0x1'));var BPromise=require(_0xf334('0x2'));var rs=require(_0xf334('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xf334('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xf334('0x5'))('rpc');var config=require(_0xf334('0x6'));var jayson=require(_0xf334('0x7'));var client=jayson['client'][_0xf334('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x5e6c9c,_0x2e3cf5,_0x3c4546){return new BPromise(function(_0x90ec29,_0x346f61){return client['request'](_0x5e6c9c,_0x3c4546)[_0xf334('0x9')](function(_0x294f66){logger[_0xf334('0xa')](_0xf334('0xb'),_0x2e3cf5,'request\x20sent');logger[_0xf334('0xc')](_0xf334('0xd'),_0x2e3cf5,_0xf334('0xe'),JSON['stringify'](_0x294f66));if(_0x294f66['error']){if(_0x294f66[_0xf334('0xf')][_0xf334('0x10')]===0x1f4){logger[_0xf334('0xf')](_0xf334('0xb'),_0x2e3cf5,_0x294f66['error'][_0xf334('0x11')]);return _0x346f61(_0x294f66[_0xf334('0xf')][_0xf334('0x11')]);}logger[_0xf334('0xf')]('ReportAgentPreview,\x20%s,\x20%s',_0x2e3cf5,_0x294f66['error']['message']);return _0x90ec29(_0x294f66[_0xf334('0xf')][_0xf334('0x11')]);}else{logger[_0xf334('0xa')](_0xf334('0xb'),_0x2e3cf5,_0xf334('0xe'));_0x90ec29(_0x294f66['result'][_0xf334('0x11')]);}})[_0xf334('0x12')](function(_0x3805f6){logger[_0xf334('0xf')](_0xf334('0xb'),_0x2e3cf5,_0x3805f6);_0x346f61(_0x3805f6);});});}exports['CreateReportAgentPreview']=function(_0x36049c){var _0x5a766e=this;return new Promise(function(_0x253fb7,_0x9d159c){return db[_0xf334('0x13')][_0xf334('0x14')](_0x36049c[_0xf334('0x15')],{'raw':_0x36049c[_0xf334('0x16')]?_0x36049c[_0xf334('0x16')][_0xf334('0x17')]===undefined?!![]:![]:!![]})['then'](function(_0x1f6ddc){logger[_0xf334('0xa')](_0xf334('0x18'),_0x36049c);logger['debug']('CreateReportAgentPreview',_0x36049c,JSON[_0xf334('0x19')](_0x1f6ddc));_0x253fb7(_0x1f6ddc);})[_0xf334('0x12')](function(_0x4c2f4c){logger[_0xf334('0xf')](_0xf334('0x18'),_0x4c2f4c[_0xf334('0x11')],_0x36049c);_0x9d159c(_0x5a766e[_0xf334('0xf')](0x1f4,_0x4c2f4c['message']));});});};
\ No newline at end of file