Built motion from commit 37e1ed56.|2.6.29
[motion2.git] / server / api / reportAgentPreview / reportAgentPreview.rpc.js
index 9782fa7..279a632 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x44c5=['catch','CreateReportAgentPreview','ReportAgentPreview','body','options','raw','stringify','lodash','util','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','info','ReportAgentPreview,\x20%s,\x20%s','request\x20sent','debug','ReportAgentPreview,\x20%s,\x20%s,\x20%s','error','code','message','result'];(function(_0x3b6c59,_0x10c316){var _0x6d60c8=function(_0x4c38f9){while(--_0x4c38f9){_0x3b6c59['push'](_0x3b6c59['shift']());}};_0x6d60c8(++_0x10c316);}(_0x44c5,0xef));var _0x544c=function(_0x27a3cb,_0x4af597){_0x27a3cb=_0x27a3cb-0x0;var _0x54ff38=_0x44c5[_0x27a3cb];return _0x54ff38;};'use strict';var _=require(_0x544c('0x0'));var util=require(_0x544c('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x544c('0x2'));var fs=require('fs');var Redis=require(_0x544c('0x3'));var db=require(_0x544c('0x4'))['db'];var utils=require(_0x544c('0x5'));var logger=require(_0x544c('0x6'))('rpc');var config=require(_0x544c('0x7'));var jayson=require(_0x544c('0x8'));var client=jayson[_0x544c('0x9')][_0x544c('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x1d92c1,_0x182c7b,_0x223e9d){return new BPromise(function(_0x48b0a3,_0x56fd3d){return client[_0x544c('0xb')](_0x1d92c1,_0x223e9d)[_0x544c('0xc')](function(_0x39ead6){logger[_0x544c('0xd')](_0x544c('0xe'),_0x182c7b,_0x544c('0xf'));logger[_0x544c('0x10')](_0x544c('0x11'),_0x182c7b,_0x544c('0xf'),JSON['stringify'](_0x39ead6));if(_0x39ead6[_0x544c('0x12')]){if(_0x39ead6[_0x544c('0x12')][_0x544c('0x13')]===0x1f4){logger[_0x544c('0x12')](_0x544c('0xe'),_0x182c7b,_0x39ead6[_0x544c('0x12')][_0x544c('0x14')]);return _0x56fd3d(_0x39ead6[_0x544c('0x12')][_0x544c('0x14')]);}logger[_0x544c('0x12')](_0x544c('0xe'),_0x182c7b,_0x39ead6['error'][_0x544c('0x14')]);return _0x48b0a3(_0x39ead6[_0x544c('0x12')]['message']);}else{logger[_0x544c('0xd')]('ReportAgentPreview,\x20%s,\x20%s',_0x182c7b,_0x544c('0xf'));_0x48b0a3(_0x39ead6[_0x544c('0x15')][_0x544c('0x14')]);}})[_0x544c('0x16')](function(_0x50ce73){logger[_0x544c('0x12')](_0x544c('0xe'),_0x182c7b,_0x50ce73);_0x56fd3d(_0x50ce73);});});}exports[_0x544c('0x17')]=function(_0x5da31e){var _0x57a746=this;return new Promise(function(_0x5d37ab,_0x32c2e5){return db[_0x544c('0x18')]['create'](_0x5da31e[_0x544c('0x19')],{'raw':_0x5da31e[_0x544c('0x1a')]?_0x5da31e[_0x544c('0x1a')][_0x544c('0x1b')]===undefined?!![]:![]:!![]})[_0x544c('0xc')](function(_0x499dd7){logger['info'](_0x544c('0x17'),_0x5da31e);logger[_0x544c('0x10')](_0x544c('0x17'),_0x5da31e,JSON[_0x544c('0x1c')](_0x499dd7));_0x5d37ab(_0x499dd7);})[_0x544c('0x16')](function(_0x1ff282){logger[_0x544c('0x12')](_0x544c('0x17'),_0x1ff282[_0x544c('0x14')],_0x5da31e);_0x32c2e5(_0x57a746[_0x544c('0x12')](0x1f4,_0x1ff282['message']));});});};
\ No newline at end of file
+var _0xb9c0=['randomstring','ioredis','../../mysqldb','../../config/environment','client','http','request','then','ReportAgentPreview,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','catch','ReportAgentPreview','create','body','options','raw','CreateReportAgentPreview','debug','lodash','util','moment'];(function(_0x5c6003,_0x9190dd){var _0x2e4c5c=function(_0x142c33){while(--_0x142c33){_0x5c6003['push'](_0x5c6003['shift']());}};_0x2e4c5c(++_0x9190dd);}(_0xb9c0,0xb3));var _0x0b9c=function(_0x3e8ada,_0x2a524b){_0x3e8ada=_0x3e8ada-0x0;var _0x28db88=_0xb9c0[_0x3e8ada];return _0x28db88;};'use strict';var _=require(_0x0b9c('0x0'));var util=require(_0x0b9c('0x1'));var moment=require(_0x0b9c('0x2'));var BPromise=require('bluebird');var rs=require(_0x0b9c('0x3'));var fs=require('fs');var Redis=require(_0x0b9c('0x4'));var db=require(_0x0b9c('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require(_0x0b9c('0x6'));var jayson=require('jayson/promise');var client=jayson[_0x0b9c('0x7')][_0x0b9c('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x153582,_0x3c7514,_0x258fce){return new BPromise(function(_0x10546a,_0x1a4f4c){return client[_0x0b9c('0x9')](_0x153582,_0x258fce)[_0x0b9c('0xa')](function(_0x2f81b5){logger['info'](_0x0b9c('0xb'),_0x3c7514,_0x0b9c('0xc'));logger['debug']('ReportAgentPreview,\x20%s,\x20%s,\x20%s',_0x3c7514,_0x0b9c('0xc'),JSON[_0x0b9c('0xd')](_0x2f81b5));if(_0x2f81b5[_0x0b9c('0xe')]){if(_0x2f81b5[_0x0b9c('0xe')][_0x0b9c('0xf')]===0x1f4){logger[_0x0b9c('0xe')](_0x0b9c('0xb'),_0x3c7514,_0x2f81b5['error']['message']);return _0x1a4f4c(_0x2f81b5[_0x0b9c('0xe')]['message']);}logger[_0x0b9c('0xe')](_0x0b9c('0xb'),_0x3c7514,_0x2f81b5[_0x0b9c('0xe')][_0x0b9c('0x10')]);return _0x10546a(_0x2f81b5[_0x0b9c('0xe')]['message']);}else{logger[_0x0b9c('0x11')](_0x0b9c('0xb'),_0x3c7514,_0x0b9c('0xc'));_0x10546a(_0x2f81b5['result']['message']);}})[_0x0b9c('0x12')](function(_0x34ad95){logger[_0x0b9c('0xe')](_0x0b9c('0xb'),_0x3c7514,_0x34ad95);_0x1a4f4c(_0x34ad95);});});}exports['CreateReportAgentPreview']=function(_0x271f0d){var _0x8db544=this;return new Promise(function(_0x384b28,_0x127ef2){return db[_0x0b9c('0x13')][_0x0b9c('0x14')](_0x271f0d[_0x0b9c('0x15')],{'raw':_0x271f0d[_0x0b9c('0x16')]?_0x271f0d[_0x0b9c('0x16')][_0x0b9c('0x17')]===undefined?!![]:![]:!![]})[_0x0b9c('0xa')](function(_0xd7c781){logger['info'](_0x0b9c('0x18'),_0x271f0d);logger[_0x0b9c('0x19')](_0x0b9c('0x18'),_0x271f0d,JSON[_0x0b9c('0xd')](_0xd7c781));_0x384b28(_0xd7c781);})[_0x0b9c('0x12')](function(_0x1b4dc3){logger[_0x0b9c('0xe')](_0x0b9c('0x18'),_0x1b4dc3[_0x0b9c('0x10')],_0x271f0d);_0x127ef2(_0x8db544[_0x0b9c('0xe')](0x1f4,_0x1b4dc3[_0x0b9c('0x10')]));});});};
\ No newline at end of file