Built motion from commit (unavailable).|2.5.30
[motion2.git] / server / api / reportAgentPreview / reportAgentPreview.rpc.js
index 2392d57..e335273 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x724c=['CreateReportAgentPreview','options','raw','randomstring','ioredis','../../config/utils','rpc','../../config/environment','jayson/promise','client','then','info','ReportAgentPreview,\x20%s,\x20%s','request\x20sent','debug','ReportAgentPreview,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result'];(function(_0x14110b,_0x3ce4f6){var _0x33d8db=function(_0x55c02f){while(--_0x55c02f){_0x14110b['push'](_0x14110b['shift']());}};_0x33d8db(++_0x3ce4f6);}(_0x724c,0x81));var _0xc724=function(_0x993c4f,_0xf34331){_0x993c4f=_0x993c4f-0x0;var _0x479802=_0x724c[_0x993c4f];return _0x479802;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xc724('0x0'));var fs=require('fs');var Redis=require(_0xc724('0x1'));var db=require('../../mysqldb')['db'];var utils=require(_0xc724('0x2'));var logger=require('../../config/logger')(_0xc724('0x3'));var config=require(_0xc724('0x4'));var jayson=require(_0xc724('0x5'));var client=jayson[_0xc724('0x6')]['http']({'port':0x232a});function respondWithRpcPromise(_0x23224b,_0x599dd5,_0x4d186a){return new BPromise(function(_0x55bb66,_0x368b61){return client['request'](_0x23224b,_0x4d186a)[_0xc724('0x7')](function(_0x5a4bc0){logger[_0xc724('0x8')](_0xc724('0x9'),_0x599dd5,_0xc724('0xa'));logger[_0xc724('0xb')](_0xc724('0xc'),_0x599dd5,'request\x20sent',JSON[_0xc724('0xd')](_0x5a4bc0));if(_0x5a4bc0[_0xc724('0xe')]){if(_0x5a4bc0[_0xc724('0xe')][_0xc724('0xf')]===0x1f4){logger[_0xc724('0xe')]('ReportAgentPreview,\x20%s,\x20%s',_0x599dd5,_0x5a4bc0[_0xc724('0xe')][_0xc724('0x10')]);return _0x368b61(_0x5a4bc0['error'][_0xc724('0x10')]);}logger['error'](_0xc724('0x9'),_0x599dd5,_0x5a4bc0['error'][_0xc724('0x10')]);return _0x55bb66(_0x5a4bc0[_0xc724('0xe')]['message']);}else{logger[_0xc724('0x8')](_0xc724('0x9'),_0x599dd5,_0xc724('0xa'));_0x55bb66(_0x5a4bc0[_0xc724('0x11')][_0xc724('0x10')]);}})['catch'](function(_0xa95bc0){logger['error'](_0xc724('0x9'),_0x599dd5,_0xa95bc0);_0x368b61(_0xa95bc0);});});}exports[_0xc724('0x12')]=function(_0x5236ff){var _0x2488ef=this;return new Promise(function(_0xf0aabc,_0x69fac8){return db['ReportAgentPreview']['create'](_0x5236ff['body'],{'raw':_0x5236ff[_0xc724('0x13')]?_0x5236ff[_0xc724('0x13')][_0xc724('0x14')]===undefined?!![]:![]:!![]})[_0xc724('0x7')](function(_0x14ea7d){logger['info'](_0xc724('0x12'),_0x5236ff);logger[_0xc724('0xb')](_0xc724('0x12'),_0x5236ff,JSON[_0xc724('0xd')](_0x14ea7d));_0xf0aabc(_0x14ea7d);})['catch'](function(_0x4231aa){logger[_0xc724('0xe')](_0xc724('0x12'),_0x4231aa[_0xc724('0x10')],_0x5236ff);_0x69fac8(_0x2488ef['error'](0x1f4,_0x4231aa['message']));});});};
\ No newline at end of file
+var _0x5aea=['request','info','request\x20sent','debug','ReportAgentPreview,\x20%s,\x20%s,\x20%s','stringify','error','code','ReportAgentPreview,\x20%s,\x20%s','message','result','CreateReportAgentPreview','ReportAgentPreview','create','body','options','raw','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','client','http'];(function(_0x4a82ac,_0x1fb931){var _0x58ee97=function(_0xc7050a){while(--_0xc7050a){_0x4a82ac['push'](_0x4a82ac['shift']());}};_0x58ee97(++_0x1fb931);}(_0x5aea,0x7d));var _0xa5ae=function(_0x3c0b40,_0x1008d9){_0x3c0b40=_0x3c0b40-0x0;var _0x16aec5=_0x5aea[_0x3c0b40];return _0x16aec5;};'use strict';var _=require('lodash');var util=require(_0xa5ae('0x0'));var moment=require(_0xa5ae('0x1'));var BPromise=require('bluebird');var rs=require(_0xa5ae('0x2'));var fs=require('fs');var Redis=require(_0xa5ae('0x3'));var db=require(_0xa5ae('0x4'))['db'];var utils=require(_0xa5ae('0x5'));var logger=require(_0xa5ae('0x6'))(_0xa5ae('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xa5ae('0x8')][_0xa5ae('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x40c537,_0x380008,_0x481d08){return new BPromise(function(_0x1dfc52,_0x9afb9d){return client[_0xa5ae('0xa')](_0x40c537,_0x481d08)['then'](function(_0x40be8a){logger[_0xa5ae('0xb')]('ReportAgentPreview,\x20%s,\x20%s',_0x380008,_0xa5ae('0xc'));logger[_0xa5ae('0xd')](_0xa5ae('0xe'),_0x380008,'request\x20sent',JSON[_0xa5ae('0xf')](_0x40be8a));if(_0x40be8a[_0xa5ae('0x10')]){if(_0x40be8a['error'][_0xa5ae('0x11')]===0x1f4){logger[_0xa5ae('0x10')](_0xa5ae('0x12'),_0x380008,_0x40be8a[_0xa5ae('0x10')][_0xa5ae('0x13')]);return _0x9afb9d(_0x40be8a[_0xa5ae('0x10')]['message']);}logger['error']('ReportAgentPreview,\x20%s,\x20%s',_0x380008,_0x40be8a[_0xa5ae('0x10')]['message']);return _0x1dfc52(_0x40be8a[_0xa5ae('0x10')]['message']);}else{logger[_0xa5ae('0xb')](_0xa5ae('0x12'),_0x380008,_0xa5ae('0xc'));_0x1dfc52(_0x40be8a[_0xa5ae('0x14')][_0xa5ae('0x13')]);}})['catch'](function(_0x464e5b){logger['error'](_0xa5ae('0x12'),_0x380008,_0x464e5b);_0x9afb9d(_0x464e5b);});});}exports[_0xa5ae('0x15')]=function(_0xbc0e3f){var _0x16cfd4=this;return new Promise(function(_0x207a4a,_0x2850e8){return db[_0xa5ae('0x16')][_0xa5ae('0x17')](_0xbc0e3f[_0xa5ae('0x18')],{'raw':_0xbc0e3f[_0xa5ae('0x19')]?_0xbc0e3f[_0xa5ae('0x19')][_0xa5ae('0x1a')]===undefined?!![]:![]:!![]})['then'](function(_0x5b9916){logger['info']('CreateReportAgentPreview',_0xbc0e3f);logger['debug'](_0xa5ae('0x15'),_0xbc0e3f,JSON[_0xa5ae('0xf')](_0x5b9916));_0x207a4a(_0x5b9916);})['catch'](function(_0x34d0cf){logger[_0xa5ae('0x10')]('CreateReportAgentPreview',_0x34d0cf[_0xa5ae('0x13')],_0xbc0e3f);_0x2850e8(_0x16cfd4[_0xa5ae('0x10')](0x1f4,_0x34d0cf[_0xa5ae('0x13')]));});});};
\ No newline at end of file