Built motion from commit fe909640.|2.6.8
[motion2.git] / server / api / smsApplication / smsApplication.rpc.js
index 837544a..b019c0f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6f47=['request\x20sent','debug','stringify','error','code','SmsApplication,\x20%s,\x20%s','message','info','result','catch','util','moment','randomstring','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then'];(function(_0x7a3247,_0x15cb12){var _0x1bfde5=function(_0x62bbef){while(--_0x62bbef){_0x7a3247['push'](_0x7a3247['shift']());}};_0x1bfde5(++_0x15cb12);}(_0x6f47,0xc7));var _0x76f4=function(_0x298ed3,_0x4ab5e1){_0x298ed3=_0x298ed3-0x0;var _0x5aad28=_0x6f47[_0x298ed3];return _0x5aad28;};'use strict';var _=require('lodash');var util=require(_0x76f4('0x0'));var moment=require(_0x76f4('0x1'));var BPromise=require('bluebird');var rs=require(_0x76f4('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x76f4('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0x76f4('0x4'))(_0x76f4('0x5'));var config=require(_0x76f4('0x6'));var jayson=require(_0x76f4('0x7'));var client=jayson['client'][_0x76f4('0x8')]({'port':0x232a});function respondWithRpcPromise(_0xfc2405,_0x2176a7,_0x497f99){return new BPromise(function(_0x1a3172,_0x25656d){return client[_0x76f4('0x9')](_0xfc2405,_0x497f99)[_0x76f4('0xa')](function(_0x101f55){logger['info']('SmsApplication,\x20%s,\x20%s',_0x2176a7,_0x76f4('0xb'));logger[_0x76f4('0xc')]('SmsApplication,\x20%s,\x20%s,\x20%s',_0x2176a7,'request\x20sent',JSON[_0x76f4('0xd')](_0x101f55));if(_0x101f55[_0x76f4('0xe')]){if(_0x101f55[_0x76f4('0xe')][_0x76f4('0xf')]===0x1f4){logger[_0x76f4('0xe')](_0x76f4('0x10'),_0x2176a7,_0x101f55[_0x76f4('0xe')][_0x76f4('0x11')]);return _0x25656d(_0x101f55[_0x76f4('0xe')]['message']);}logger[_0x76f4('0xe')](_0x76f4('0x10'),_0x2176a7,_0x101f55['error']['message']);return _0x1a3172(_0x101f55['error'][_0x76f4('0x11')]);}else{logger[_0x76f4('0x12')](_0x76f4('0x10'),_0x2176a7,_0x76f4('0xb'));_0x1a3172(_0x101f55[_0x76f4('0x13')][_0x76f4('0x11')]);}})[_0x76f4('0x14')](function(_0x981a87){logger[_0x76f4('0xe')](_0x76f4('0x10'),_0x2176a7,_0x981a87);_0x25656d(_0x981a87);});});}
\ No newline at end of file
+var _0x7096=['code','message','result','catch','util','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','then','info','SmsApplication,\x20%s,\x20%s','request\x20sent','debug','stringify','error'];(function(_0x25e109,_0x6ab24c){var _0xc0f7d6=function(_0x2fb92b){while(--_0x2fb92b){_0x25e109['push'](_0x25e109['shift']());}};_0xc0f7d6(++_0x6ab24c);}(_0x7096,0x10c));var _0x6709=function(_0x4709c0,_0x3396c7){_0x4709c0=_0x4709c0-0x0;var _0x13348b=_0x7096[_0x4709c0];return _0x13348b;};'use strict';var _=require('lodash');var util=require(_0x6709('0x0'));var moment=require('moment');var BPromise=require(_0x6709('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x6709('0x2'));var db=require(_0x6709('0x3'))['db'];var utils=require(_0x6709('0x4'));var logger=require(_0x6709('0x5'))(_0x6709('0x6'));var config=require(_0x6709('0x7'));var jayson=require(_0x6709('0x8'));var client=jayson[_0x6709('0x9')][_0x6709('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3e2223,_0x11ad23,_0x985814){return new BPromise(function(_0x30147f,_0x513ab6){return client['request'](_0x3e2223,_0x985814)[_0x6709('0xb')](function(_0x2d8c0b){logger[_0x6709('0xc')](_0x6709('0xd'),_0x11ad23,_0x6709('0xe'));logger[_0x6709('0xf')]('SmsApplication,\x20%s,\x20%s,\x20%s',_0x11ad23,'request\x20sent',JSON[_0x6709('0x10')](_0x2d8c0b));if(_0x2d8c0b[_0x6709('0x11')]){if(_0x2d8c0b[_0x6709('0x11')][_0x6709('0x12')]===0x1f4){logger[_0x6709('0x11')](_0x6709('0xd'),_0x11ad23,_0x2d8c0b[_0x6709('0x11')][_0x6709('0x13')]);return _0x513ab6(_0x2d8c0b['error'][_0x6709('0x13')]);}logger[_0x6709('0x11')](_0x6709('0xd'),_0x11ad23,_0x2d8c0b[_0x6709('0x11')]['message']);return _0x30147f(_0x2d8c0b[_0x6709('0x11')]['message']);}else{logger[_0x6709('0xc')]('SmsApplication,\x20%s,\x20%s',_0x11ad23,_0x6709('0xe'));_0x30147f(_0x2d8c0b[_0x6709('0x14')][_0x6709('0x13')]);}})[_0x6709('0x15')](function(_0x4cab30){logger['error']('SmsApplication,\x20%s,\x20%s',_0x11ad23,_0x4cab30);_0x513ab6(_0x4cab30);});});}
\ No newline at end of file