Built motion from commit 351e7f9c.|2.6.31
[motion2.git] / server / api / smsApplication / smsApplication.rpc.js
index 141e5ed..870894d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x337f=['moment','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','jayson/promise','http','request','then','info','SmsApplication,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','lodash','util'];(function(_0x49987f,_0x532062){var _0x3e1766=function(_0x11e938){while(--_0x11e938){_0x49987f['push'](_0x49987f['shift']());}};_0x3e1766(++_0x532062);}(_0x337f,0x11c));var _0xf337=function(_0x14e22f,_0x2b05d6){_0x14e22f=_0x14e22f-0x0;var _0x2b6e0b=_0x337f[_0x14e22f];return _0x2b6e0b;};'use strict';var _=require(_0xf337('0x0'));var util=require(_0xf337('0x1'));var moment=require(_0xf337('0x2'));var BPromise=require('bluebird');var rs=require(_0xf337('0x3'));var fs=require('fs');var Redis=require(_0xf337('0x4'));var db=require(_0xf337('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xf337('0x6'))(_0xf337('0x7'));var config=require('../../config/environment');var jayson=require(_0xf337('0x8'));var client=jayson['client'][_0xf337('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x5ae4d6,_0x2be604,_0x56bd39){return new BPromise(function(_0x4b80a2,_0x1f0a95){return client[_0xf337('0xa')](_0x5ae4d6,_0x56bd39)[_0xf337('0xb')](function(_0x2a4619){logger[_0xf337('0xc')](_0xf337('0xd'),_0x2be604,_0xf337('0xe'));logger[_0xf337('0xf')]('SmsApplication,\x20%s,\x20%s,\x20%s',_0x2be604,_0xf337('0xe'),JSON[_0xf337('0x10')](_0x2a4619));if(_0x2a4619[_0xf337('0x11')]){if(_0x2a4619[_0xf337('0x11')][_0xf337('0x12')]===0x1f4){logger[_0xf337('0x11')](_0xf337('0xd'),_0x2be604,_0x2a4619[_0xf337('0x11')][_0xf337('0x13')]);return _0x1f0a95(_0x2a4619[_0xf337('0x11')][_0xf337('0x13')]);}logger[_0xf337('0x11')]('SmsApplication,\x20%s,\x20%s',_0x2be604,_0x2a4619[_0xf337('0x11')][_0xf337('0x13')]);return _0x4b80a2(_0x2a4619[_0xf337('0x11')]['message']);}else{logger[_0xf337('0xc')](_0xf337('0xd'),_0x2be604,'request\x20sent');_0x4b80a2(_0x2a4619[_0xf337('0x14')][_0xf337('0x13')]);}})[_0xf337('0x15')](function(_0x4a7e4c){logger[_0xf337('0x11')]('SmsApplication,\x20%s,\x20%s',_0x2be604,_0x4a7e4c);_0x1f0a95(_0x4a7e4c);});});}
\ No newline at end of file
+var _0x09df=['rpc','../../config/environment','request','then','info','request\x20sent','debug','error','code','SmsApplication,\x20%s,\x20%s','message','lodash','util','bluebird','../../mysqldb'];(function(_0x2ba01a,_0x263f07){var _0x588b81=function(_0x131313){while(--_0x131313){_0x2ba01a['push'](_0x2ba01a['shift']());}};_0x588b81(++_0x263f07);}(_0x09df,0x164));var _0xf09d=function(_0x17b6e3,_0x4522ed){_0x17b6e3=_0x17b6e3-0x0;var _0x3906f3=_0x09df[_0x17b6e3];return _0x3906f3;};'use strict';var _=require(_0xf09d('0x0'));var util=require(_0xf09d('0x1'));var moment=require('moment');var BPromise=require(_0xf09d('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xf09d('0x3'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xf09d('0x4'));var config=require(_0xf09d('0x5'));var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x284a42,_0x48b82f,_0x28c91c){return new BPromise(function(_0x2555c7,_0x2f1810){return client[_0xf09d('0x6')](_0x284a42,_0x28c91c)[_0xf09d('0x7')](function(_0x2a59a8){logger[_0xf09d('0x8')]('SmsApplication,\x20%s,\x20%s',_0x48b82f,_0xf09d('0x9'));logger[_0xf09d('0xa')]('SmsApplication,\x20%s,\x20%s,\x20%s',_0x48b82f,_0xf09d('0x9'),JSON['stringify'](_0x2a59a8));if(_0x2a59a8[_0xf09d('0xb')]){if(_0x2a59a8[_0xf09d('0xb')][_0xf09d('0xc')]===0x1f4){logger[_0xf09d('0xb')](_0xf09d('0xd'),_0x48b82f,_0x2a59a8[_0xf09d('0xb')][_0xf09d('0xe')]);return _0x2f1810(_0x2a59a8[_0xf09d('0xb')][_0xf09d('0xe')]);}logger['error'](_0xf09d('0xd'),_0x48b82f,_0x2a59a8[_0xf09d('0xb')][_0xf09d('0xe')]);return _0x2555c7(_0x2a59a8['error']['message']);}else{logger[_0xf09d('0x8')](_0xf09d('0xd'),_0x48b82f,_0xf09d('0x9'));_0x2555c7(_0x2a59a8['result'][_0xf09d('0xe')]);}})['catch'](function(_0x3614f7){logger[_0xf09d('0xb')](_0xf09d('0xd'),_0x48b82f,_0x3614f7);_0x2f1810(_0x3614f7);});});}
\ No newline at end of file