Built motion from commit b5413ace.|2.6.9
[motion2.git] / server / api / reportAgentPreview / reportAgentPreview.rpc.js
index a66d41e..7282e99 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x188d=['code','ReportAgentPreview,\x20%s,\x20%s','message','info','CreateReportAgentPreview','ReportAgentPreview','create','body','options','raw','stringify','catch','lodash','util','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','request\x20sent','debug','ReportAgentPreview,\x20%s,\x20%s,\x20%s','error'];(function(_0x46ed8c,_0x3c606f){var _0x4d83f9=function(_0x49e6f0){while(--_0x49e6f0){_0x46ed8c['push'](_0x46ed8c['shift']());}};_0x4d83f9(++_0x3c606f);}(_0x188d,0x140));var _0xd188=function(_0x34404c,_0x49b8d1){_0x34404c=_0x34404c-0x0;var _0x46d1f2=_0x188d[_0x34404c];return _0x46d1f2;};'use strict';var _=require(_0xd188('0x0'));var util=require(_0xd188('0x1'));var moment=require('moment');var BPromise=require(_0xd188('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xd188('0x3'));var db=require(_0xd188('0x4'))['db'];var utils=require(_0xd188('0x5'));var logger=require(_0xd188('0x6'))(_0xd188('0x7'));var config=require(_0xd188('0x8'));var jayson=require(_0xd188('0x9'));var client=jayson['client'][_0xd188('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x2aa54f,_0xea7e3a,_0x32a44a){return new BPromise(function(_0x16e8a5,_0x33b021){return client[_0xd188('0xb')](_0x2aa54f,_0x32a44a)['then'](function(_0x5aa6fb){logger['info']('ReportAgentPreview,\x20%s,\x20%s',_0xea7e3a,_0xd188('0xc'));logger[_0xd188('0xd')](_0xd188('0xe'),_0xea7e3a,_0xd188('0xc'),JSON['stringify'](_0x5aa6fb));if(_0x5aa6fb[_0xd188('0xf')]){if(_0x5aa6fb[_0xd188('0xf')][_0xd188('0x10')]===0x1f4){logger[_0xd188('0xf')](_0xd188('0x11'),_0xea7e3a,_0x5aa6fb[_0xd188('0xf')]['message']);return _0x33b021(_0x5aa6fb[_0xd188('0xf')]['message']);}logger[_0xd188('0xf')](_0xd188('0x11'),_0xea7e3a,_0x5aa6fb['error'][_0xd188('0x12')]);return _0x16e8a5(_0x5aa6fb[_0xd188('0xf')][_0xd188('0x12')]);}else{logger[_0xd188('0x13')](_0xd188('0x11'),_0xea7e3a,_0xd188('0xc'));_0x16e8a5(_0x5aa6fb['result'][_0xd188('0x12')]);}})['catch'](function(_0x494d9c){logger[_0xd188('0xf')](_0xd188('0x11'),_0xea7e3a,_0x494d9c);_0x33b021(_0x494d9c);});});}exports[_0xd188('0x14')]=function(_0x5a5a8a){var _0x43ddda=this;return new Promise(function(_0x147cbf,_0x1cf038){return db[_0xd188('0x15')][_0xd188('0x16')](_0x5a5a8a[_0xd188('0x17')],{'raw':_0x5a5a8a[_0xd188('0x18')]?_0x5a5a8a['options'][_0xd188('0x19')]===undefined?!![]:![]:!![]})['then'](function(_0x2acda7){logger[_0xd188('0x13')](_0xd188('0x14'),_0x5a5a8a);logger[_0xd188('0xd')](_0xd188('0x14'),_0x5a5a8a,JSON[_0xd188('0x1a')](_0x2acda7));_0x147cbf(_0x2acda7);})[_0xd188('0x1b')](function(_0x5931b4){logger[_0xd188('0xf')](_0xd188('0x14'),_0x5931b4[_0xd188('0x12')],_0x5a5a8a);_0x1cf038(_0x43ddda[_0xd188('0xf')](0x1f4,_0x5931b4['message']));});});};
\ No newline at end of file
+var _0x32b6=['randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','info','ReportAgentPreview,\x20%s,\x20%s','debug','ReportAgentPreview,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','result','catch','CreateReportAgentPreview','create','body','options','raw','stringify','lodash','util','moment','bluebird'];(function(_0x42d53c,_0x33d4cb){var _0x319acf=function(_0x31f6b0){while(--_0x31f6b0){_0x42d53c['push'](_0x42d53c['shift']());}};_0x319acf(++_0x33d4cb);}(_0x32b6,0x1f4));var _0x632b=function(_0x44cb1f,_0x5b68d5){_0x44cb1f=_0x44cb1f-0x0;var _0xbb2135=_0x32b6[_0x44cb1f];return _0xbb2135;};'use strict';var _=require(_0x632b('0x0'));var util=require(_0x632b('0x1'));var moment=require(_0x632b('0x2'));var BPromise=require(_0x632b('0x3'));var rs=require(_0x632b('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x632b('0x5'))['db'];var utils=require(_0x632b('0x6'));var logger=require(_0x632b('0x7'))(_0x632b('0x8'));var config=require(_0x632b('0x9'));var jayson=require('jayson/promise');var client=jayson[_0x632b('0xa')][_0x632b('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x5da1fd,_0x2ebd26,_0x19a86a){return new BPromise(function(_0x525453,_0x13ef00){return client['request'](_0x5da1fd,_0x19a86a)['then'](function(_0x35e1da){logger[_0x632b('0xc')](_0x632b('0xd'),_0x2ebd26,'request\x20sent');logger[_0x632b('0xe')](_0x632b('0xf'),_0x2ebd26,_0x632b('0x10'),JSON['stringify'](_0x35e1da));if(_0x35e1da[_0x632b('0x11')]){if(_0x35e1da[_0x632b('0x11')][_0x632b('0x12')]===0x1f4){logger[_0x632b('0x11')](_0x632b('0xd'),_0x2ebd26,_0x35e1da['error']['message']);return _0x13ef00(_0x35e1da[_0x632b('0x11')][_0x632b('0x13')]);}logger[_0x632b('0x11')](_0x632b('0xd'),_0x2ebd26,_0x35e1da[_0x632b('0x11')][_0x632b('0x13')]);return _0x525453(_0x35e1da[_0x632b('0x11')][_0x632b('0x13')]);}else{logger[_0x632b('0xc')](_0x632b('0xd'),_0x2ebd26,_0x632b('0x10'));_0x525453(_0x35e1da[_0x632b('0x14')][_0x632b('0x13')]);}})[_0x632b('0x15')](function(_0x4ad9ab){logger['error'](_0x632b('0xd'),_0x2ebd26,_0x4ad9ab);_0x13ef00(_0x4ad9ab);});});}exports[_0x632b('0x16')]=function(_0x2253d4){var _0x490473=this;return new Promise(function(_0x6de77a,_0x22f1b7){return db['ReportAgentPreview'][_0x632b('0x17')](_0x2253d4[_0x632b('0x18')],{'raw':_0x2253d4[_0x632b('0x19')]?_0x2253d4[_0x632b('0x19')][_0x632b('0x1a')]===undefined?!![]:![]:!![]})['then'](function(_0x3e4dfd){logger[_0x632b('0xc')](_0x632b('0x16'),_0x2253d4);logger[_0x632b('0xe')](_0x632b('0x16'),_0x2253d4,JSON[_0x632b('0x1b')](_0x3e4dfd));_0x6de77a(_0x3e4dfd);})[_0x632b('0x15')](function(_0xfb35c0){logger[_0x632b('0x11')](_0x632b('0x16'),_0xfb35c0[_0x632b('0x13')],_0x2253d4);_0x22f1b7(_0x490473['error'](0x1f4,_0xfb35c0[_0x632b('0x13')]));});});};
\ No newline at end of file