Built motion from commit (unavailable).|2.5.17
[motion2.git] / server / api / smsApplication / smsApplication.rpc.js
index 7728198..a34de16 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1bce=['../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','request','SmsApplication,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','info','lodash','util','bluebird','randomstring','ioredis'];(function(_0x351885,_0x54f177){var _0x48196e=function(_0x30e983){while(--_0x30e983){_0x351885['push'](_0x351885['shift']());}};_0x48196e(++_0x54f177);}(_0x1bce,0x73));var _0xe1bc=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0x1bce[_0x122ef9];return _0x42fba0;};'use strict';var _=require(_0xe1bc('0x0'));var util=require(_0xe1bc('0x1'));var moment=require('moment');var BPromise=require(_0xe1bc('0x2'));var rs=require(_0xe1bc('0x3'));var fs=require('fs');var Redis=require(_0xe1bc('0x4'));var db=require(_0xe1bc('0x5'))['db'];var utils=require(_0xe1bc('0x6'));var logger=require(_0xe1bc('0x7'))(_0xe1bc('0x8'));var config=require(_0xe1bc('0x9'));var jayson=require(_0xe1bc('0xa'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x324c27,_0x4199ff,_0x24b695){return new BPromise(function(_0x1c6720,_0x1a861f){return client[_0xe1bc('0xb')](_0x324c27,_0x24b695)['then'](function(_0x46a0ed){logger['info'](_0xe1bc('0xc'),_0x4199ff,_0xe1bc('0xd'));logger[_0xe1bc('0xe')]('SmsApplication,\x20%s,\x20%s,\x20%s',_0x4199ff,_0xe1bc('0xd'),JSON[_0xe1bc('0xf')](_0x46a0ed));if(_0x46a0ed['error']){if(_0x46a0ed[_0xe1bc('0x10')][_0xe1bc('0x11')]===0x1f4){logger['error']('SmsApplication,\x20%s,\x20%s',_0x4199ff,_0x46a0ed[_0xe1bc('0x10')][_0xe1bc('0x12')]);return _0x1a861f(_0x46a0ed[_0xe1bc('0x10')]['message']);}logger['error'](_0xe1bc('0xc'),_0x4199ff,_0x46a0ed[_0xe1bc('0x10')][_0xe1bc('0x12')]);return _0x1c6720(_0x46a0ed['error'][_0xe1bc('0x12')]);}else{logger[_0xe1bc('0x13')](_0xe1bc('0xc'),_0x4199ff,_0xe1bc('0xd'));_0x1c6720(_0x46a0ed['result'][_0xe1bc('0x12')]);}})['catch'](function(_0x306165){logger[_0xe1bc('0x10')]('SmsApplication,\x20%s,\x20%s',_0x4199ff,_0x306165);_0x1a861f(_0x306165);});});}
\ No newline at end of file
+var _0xf6c1=['jayson/promise','client','http','request','then','info','SmsApplication,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','moment','bluebird','randomstring','../../mysqldb','../../config/logger','rpc','../../config/environment'];(function(_0x1eaa31,_0x47592){var _0x40c0dc=function(_0xf3c7b2){while(--_0xf3c7b2){_0x1eaa31['push'](_0x1eaa31['shift']());}};_0x40c0dc(++_0x47592);}(_0xf6c1,0x99));var _0x1f6c=function(_0x2e4ea2,_0x25fa90){_0x2e4ea2=_0x2e4ea2-0x0;var _0x4455e8=_0xf6c1[_0x2e4ea2];return _0x4455e8;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x1f6c('0x0'));var BPromise=require(_0x1f6c('0x1'));var rs=require(_0x1f6c('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x1f6c('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0x1f6c('0x4'))(_0x1f6c('0x5'));var config=require(_0x1f6c('0x6'));var jayson=require(_0x1f6c('0x7'));var client=jayson[_0x1f6c('0x8')][_0x1f6c('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x530b25,_0x3c7569,_0x1385de){return new BPromise(function(_0xade159,_0xcf5c23){return client[_0x1f6c('0xa')](_0x530b25,_0x1385de)[_0x1f6c('0xb')](function(_0x1e7287){logger[_0x1f6c('0xc')](_0x1f6c('0xd'),_0x3c7569,'request\x20sent');logger['debug']('SmsApplication,\x20%s,\x20%s,\x20%s',_0x3c7569,_0x1f6c('0xe'),JSON[_0x1f6c('0xf')](_0x1e7287));if(_0x1e7287[_0x1f6c('0x10')]){if(_0x1e7287[_0x1f6c('0x10')][_0x1f6c('0x11')]===0x1f4){logger[_0x1f6c('0x10')]('SmsApplication,\x20%s,\x20%s',_0x3c7569,_0x1e7287[_0x1f6c('0x10')][_0x1f6c('0x12')]);return _0xcf5c23(_0x1e7287[_0x1f6c('0x10')][_0x1f6c('0x12')]);}logger[_0x1f6c('0x10')](_0x1f6c('0xd'),_0x3c7569,_0x1e7287[_0x1f6c('0x10')][_0x1f6c('0x12')]);return _0xade159(_0x1e7287['error'][_0x1f6c('0x12')]);}else{logger[_0x1f6c('0xc')](_0x1f6c('0xd'),_0x3c7569,_0x1f6c('0xe'));_0xade159(_0x1e7287[_0x1f6c('0x13')][_0x1f6c('0x12')]);}})['catch'](function(_0x521c4c){logger[_0x1f6c('0x10')](_0x1f6c('0xd'),_0x3c7569,_0x521c4c);_0xcf5c23(_0x521c4c);});});}
\ No newline at end of file