Built motion from commit 775e2a94.|2.6.3
[motion2.git] / server / api / smsApplication / smsApplication.rpc.js
index 95ffa2a..f92df43 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbfe8=['stringify','error','message','result','util','bluebird','randomstring','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','request','then','info','SmsApplication,\x20%s,\x20%s','request\x20sent','debug','SmsApplication,\x20%s,\x20%s,\x20%s'];(function(_0x584985,_0x31a01f){var _0x123c16=function(_0x54ae33){while(--_0x54ae33){_0x584985['push'](_0x584985['shift']());}};_0x123c16(++_0x31a01f);}(_0xbfe8,0x1b9));var _0x8bfe=function(_0x580d3a,_0x529919){_0x580d3a=_0x580d3a-0x0;var _0x2484d8=_0xbfe8[_0x580d3a];return _0x2484d8;};'use strict';var _=require('lodash');var util=require(_0x8bfe('0x0'));var moment=require('moment');var BPromise=require(_0x8bfe('0x1'));var rs=require(_0x8bfe('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x8bfe('0x3'));var logger=require(_0x8bfe('0x4'))('rpc');var config=require(_0x8bfe('0x5'));var jayson=require(_0x8bfe('0x6'));var client=jayson[_0x8bfe('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0x29bb94,_0x1b7dbd,_0x3e3075){return new BPromise(function(_0x4602fc,_0x5d4e54){return client[_0x8bfe('0x8')](_0x29bb94,_0x3e3075)[_0x8bfe('0x9')](function(_0x147c65){logger[_0x8bfe('0xa')](_0x8bfe('0xb'),_0x1b7dbd,_0x8bfe('0xc'));logger[_0x8bfe('0xd')](_0x8bfe('0xe'),_0x1b7dbd,_0x8bfe('0xc'),JSON[_0x8bfe('0xf')](_0x147c65));if(_0x147c65['error']){if(_0x147c65[_0x8bfe('0x10')]['code']===0x1f4){logger[_0x8bfe('0x10')](_0x8bfe('0xb'),_0x1b7dbd,_0x147c65[_0x8bfe('0x10')]['message']);return _0x5d4e54(_0x147c65['error'][_0x8bfe('0x11')]);}logger[_0x8bfe('0x10')](_0x8bfe('0xb'),_0x1b7dbd,_0x147c65[_0x8bfe('0x10')][_0x8bfe('0x11')]);return _0x4602fc(_0x147c65['error'][_0x8bfe('0x11')]);}else{logger[_0x8bfe('0xa')]('SmsApplication,\x20%s,\x20%s',_0x1b7dbd,_0x8bfe('0xc'));_0x4602fc(_0x147c65[_0x8bfe('0x12')][_0x8bfe('0x11')]);}})['catch'](function(_0x4efb72){logger[_0x8bfe('0x10')]('SmsApplication,\x20%s,\x20%s',_0x1b7dbd,_0x4efb72);_0x5d4e54(_0x4efb72);});});}
\ No newline at end of file
+var _0x1c9a=['http','request','then','info','request\x20sent','debug','SmsApplication,\x20%s,\x20%s,\x20%s','stringify','error','code','SmsApplication,\x20%s,\x20%s','message','result','catch','lodash','moment','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0x1c9a,0x98));var _0xa1c9=function(_0x39d0e3,_0x511081){_0x39d0e3=_0x39d0e3-0x0;var _0x5f4133=_0x1c9a[_0x39d0e3];return _0x5f4133;};'use strict';var _=require(_0xa1c9('0x0'));var util=require('util');var moment=require(_0xa1c9('0x1'));var BPromise=require('bluebird');var rs=require(_0xa1c9('0x2'));var fs=require('fs');var Redis=require(_0xa1c9('0x3'));var db=require(_0xa1c9('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xa1c9('0x5'))(_0xa1c9('0x6'));var config=require(_0xa1c9('0x7'));var jayson=require(_0xa1c9('0x8'));var client=jayson['client'][_0xa1c9('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x5448f2,_0x222624,_0x463c9c){return new BPromise(function(_0x3f07c2,_0x5059df){return client[_0xa1c9('0xa')](_0x5448f2,_0x463c9c)[_0xa1c9('0xb')](function(_0x24136d){logger[_0xa1c9('0xc')]('SmsApplication,\x20%s,\x20%s',_0x222624,_0xa1c9('0xd'));logger[_0xa1c9('0xe')](_0xa1c9('0xf'),_0x222624,_0xa1c9('0xd'),JSON[_0xa1c9('0x10')](_0x24136d));if(_0x24136d[_0xa1c9('0x11')]){if(_0x24136d[_0xa1c9('0x11')][_0xa1c9('0x12')]===0x1f4){logger[_0xa1c9('0x11')](_0xa1c9('0x13'),_0x222624,_0x24136d['error'][_0xa1c9('0x14')]);return _0x5059df(_0x24136d[_0xa1c9('0x11')][_0xa1c9('0x14')]);}logger[_0xa1c9('0x11')](_0xa1c9('0x13'),_0x222624,_0x24136d['error'][_0xa1c9('0x14')]);return _0x3f07c2(_0x24136d[_0xa1c9('0x11')][_0xa1c9('0x14')]);}else{logger[_0xa1c9('0xc')](_0xa1c9('0x13'),_0x222624,_0xa1c9('0xd'));_0x3f07c2(_0x24136d[_0xa1c9('0x15')][_0xa1c9('0x14')]);}})[_0xa1c9('0x16')](function(_0x373f5d){logger['error'](_0xa1c9('0x13'),_0x222624,_0x373f5d);_0x5059df(_0x373f5d);});});}
\ No newline at end of file