Built motion from commit 06a208af.|2.6.26
[motion2.git] / server / api / reportAgentPreview / reportAgentPreview.rpc.js
index be75534..d23b529 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7fd3=['../../config/logger','../../config/environment','jayson/promise','http','request','ReportAgentPreview,\x20%s,\x20%s','debug','ReportAgentPreview,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','catch','ReportAgentPreview','options','raw','then','info','CreateReportAgentPreview','lodash','bluebird','randomstring','ioredis','../../mysqldb'];(function(_0x2d8af0,_0x305bd8){var _0x5112e8=function(_0x3166d9){while(--_0x3166d9){_0x2d8af0['push'](_0x2d8af0['shift']());}};_0x5112e8(++_0x305bd8);}(_0x7fd3,0x172));var _0x37fd=function(_0x151116,_0x35c3bd){_0x151116=_0x151116-0x0;var _0x33f476=_0x7fd3[_0x151116];return _0x33f476;};'use strict';var _=require(_0x37fd('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x37fd('0x1'));var rs=require(_0x37fd('0x2'));var fs=require('fs');var Redis=require(_0x37fd('0x3'));var db=require(_0x37fd('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x37fd('0x5'))('rpc');var config=require(_0x37fd('0x6'));var jayson=require(_0x37fd('0x7'));var client=jayson['client'][_0x37fd('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x2f4fa6,_0x6b960c,_0x1007c5){return new BPromise(function(_0x513fa7,_0x1d1716){return client[_0x37fd('0x9')](_0x2f4fa6,_0x1007c5)['then'](function(_0x10b829){logger['info'](_0x37fd('0xa'),_0x6b960c,'request\x20sent');logger[_0x37fd('0xb')](_0x37fd('0xc'),_0x6b960c,_0x37fd('0xd'),JSON[_0x37fd('0xe')](_0x10b829));if(_0x10b829[_0x37fd('0xf')]){if(_0x10b829['error']['code']===0x1f4){logger[_0x37fd('0xf')](_0x37fd('0xa'),_0x6b960c,_0x10b829['error'][_0x37fd('0x10')]);return _0x1d1716(_0x10b829[_0x37fd('0xf')][_0x37fd('0x10')]);}logger[_0x37fd('0xf')](_0x37fd('0xa'),_0x6b960c,_0x10b829['error'][_0x37fd('0x10')]);return _0x513fa7(_0x10b829['error'][_0x37fd('0x10')]);}else{logger['info'](_0x37fd('0xa'),_0x6b960c,_0x37fd('0xd'));_0x513fa7(_0x10b829[_0x37fd('0x11')][_0x37fd('0x10')]);}})[_0x37fd('0x12')](function(_0x4c7a9b){logger[_0x37fd('0xf')]('ReportAgentPreview,\x20%s,\x20%s',_0x6b960c,_0x4c7a9b);_0x1d1716(_0x4c7a9b);});});}exports['CreateReportAgentPreview']=function(_0x3cf890){var _0x1cc957=this;return new Promise(function(_0x2e63e3,_0x5049f1){return db[_0x37fd('0x13')]['create'](_0x3cf890['body'],{'raw':_0x3cf890[_0x37fd('0x14')]?_0x3cf890['options'][_0x37fd('0x15')]===undefined?!![]:![]:!![]})[_0x37fd('0x16')](function(_0x1e0fbe){logger[_0x37fd('0x17')]('CreateReportAgentPreview',_0x3cf890);logger['debug'](_0x37fd('0x18'),_0x3cf890,JSON[_0x37fd('0xe')](_0x1e0fbe));_0x2e63e3(_0x1e0fbe);})[_0x37fd('0x12')](function(_0x530366){logger[_0x37fd('0xf')](_0x37fd('0x18'),_0x530366[_0x37fd('0x10')],_0x3cf890);_0x5049f1(_0x1cc957[_0x37fd('0xf')](0x1f4,_0x530366[_0x37fd('0x10')]));});});};
\ No newline at end of file
+var _0xe381=['ReportAgentPreview,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','result','CreateReportAgentPreview','ReportAgentPreview','create','body','options','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','http','request','then','info','ReportAgentPreview,\x20%s,\x20%s','debug'];(function(_0x46764d,_0x4fab5d){var _0x1eece9=function(_0x53b82c){while(--_0x53b82c){_0x46764d['push'](_0x46764d['shift']());}};_0x1eece9(++_0x4fab5d);}(_0xe381,0x93));var _0x1e38=function(_0x4b7f28,_0x27d23a){_0x4b7f28=_0x4b7f28-0x0;var _0xf5b553=_0xe381[_0x4b7f28];return _0xf5b553;};'use strict';var _=require('lodash');var util=require(_0x1e38('0x0'));var moment=require(_0x1e38('0x1'));var BPromise=require(_0x1e38('0x2'));var rs=require(_0x1e38('0x3'));var fs=require('fs');var Redis=require(_0x1e38('0x4'));var db=require(_0x1e38('0x5'))['db'];var utils=require(_0x1e38('0x6'));var logger=require(_0x1e38('0x7'))('rpc');var config=require('../../config/environment');var jayson=require(_0x1e38('0x8'));var client=jayson['client'][_0x1e38('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x341063,_0x1d004e,_0xf5b6f){return new BPromise(function(_0x1d656d,_0x4fc956){return client[_0x1e38('0xa')](_0x341063,_0xf5b6f)[_0x1e38('0xb')](function(_0x296030){logger[_0x1e38('0xc')](_0x1e38('0xd'),_0x1d004e,'request\x20sent');logger[_0x1e38('0xe')](_0x1e38('0xf'),_0x1d004e,_0x1e38('0x10'),JSON['stringify'](_0x296030));if(_0x296030[_0x1e38('0x11')]){if(_0x296030[_0x1e38('0x11')][_0x1e38('0x12')]===0x1f4){logger[_0x1e38('0x11')](_0x1e38('0xd'),_0x1d004e,_0x296030[_0x1e38('0x11')]['message']);return _0x4fc956(_0x296030['error'][_0x1e38('0x13')]);}logger[_0x1e38('0x11')]('ReportAgentPreview,\x20%s,\x20%s',_0x1d004e,_0x296030[_0x1e38('0x11')][_0x1e38('0x13')]);return _0x1d656d(_0x296030[_0x1e38('0x11')]['message']);}else{logger[_0x1e38('0xc')](_0x1e38('0xd'),_0x1d004e,_0x1e38('0x10'));_0x1d656d(_0x296030[_0x1e38('0x14')][_0x1e38('0x13')]);}})['catch'](function(_0x2010fe){logger[_0x1e38('0x11')]('ReportAgentPreview,\x20%s,\x20%s',_0x1d004e,_0x2010fe);_0x4fc956(_0x2010fe);});});}exports[_0x1e38('0x15')]=function(_0x5c6134){var _0x5047ed=this;return new Promise(function(_0x18246c,_0xd27c7b){return db[_0x1e38('0x16')][_0x1e38('0x17')](_0x5c6134[_0x1e38('0x18')],{'raw':_0x5c6134[_0x1e38('0x19')]?_0x5c6134[_0x1e38('0x19')]['raw']===undefined?!![]:![]:!![]})[_0x1e38('0xb')](function(_0x3686af){logger['info']('CreateReportAgentPreview',_0x5c6134);logger['debug']('CreateReportAgentPreview',_0x5c6134,JSON['stringify'](_0x3686af));_0x18246c(_0x3686af);})[_0x1e38('0x1a')](function(_0xc9fffd){logger[_0x1e38('0x11')](_0x1e38('0x15'),_0xc9fffd[_0x1e38('0x13')],_0x5c6134);_0xd27c7b(_0x5047ed[_0x1e38('0x11')](0x1f4,_0xc9fffd['message']));});});};
\ No newline at end of file