Built motion from commit d5e4af8c.|2.6.23
[motion2.git] / server / api / smsApplication / smsApplication.rpc.js
index a34de16..f4d5617 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-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
+var _0x414f=['then','info','SmsApplication,\x20%s,\x20%s','request\x20sent','debug','SmsApplication,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','lodash','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http'];(function(_0x6c993a,_0x5ea3ab){var _0x27f547=function(_0x22df20){while(--_0x22df20){_0x6c993a['push'](_0x6c993a['shift']());}};_0x27f547(++_0x5ea3ab);}(_0x414f,0x13f));var _0xf414=function(_0x1405c1,_0x532676){_0x1405c1=_0x1405c1-0x0;var _0x59aabc=_0x414f[_0x1405c1];return _0x59aabc;};'use strict';var _=require(_0xf414('0x0'));var util=require('util');var moment=require(_0xf414('0x1'));var BPromise=require(_0xf414('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xf414('0x3'));var db=require(_0xf414('0x4'))['db'];var utils=require(_0xf414('0x5'));var logger=require(_0xf414('0x6'))(_0xf414('0x7'));var config=require(_0xf414('0x8'));var jayson=require(_0xf414('0x9'));var client=jayson['client'][_0xf414('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x4cdcdb,_0x34c4d0,_0x2306e5){return new BPromise(function(_0xad732,_0x5194e5){return client['request'](_0x4cdcdb,_0x2306e5)[_0xf414('0xb')](function(_0x2bbf01){logger[_0xf414('0xc')](_0xf414('0xd'),_0x34c4d0,_0xf414('0xe'));logger[_0xf414('0xf')](_0xf414('0x10'),_0x34c4d0,_0xf414('0xe'),JSON['stringify'](_0x2bbf01));if(_0x2bbf01['error']){if(_0x2bbf01[_0xf414('0x11')][_0xf414('0x12')]===0x1f4){logger[_0xf414('0x11')](_0xf414('0xd'),_0x34c4d0,_0x2bbf01[_0xf414('0x11')]['message']);return _0x5194e5(_0x2bbf01[_0xf414('0x11')][_0xf414('0x13')]);}logger[_0xf414('0x11')](_0xf414('0xd'),_0x34c4d0,_0x2bbf01[_0xf414('0x11')]['message']);return _0xad732(_0x2bbf01[_0xf414('0x11')][_0xf414('0x13')]);}else{logger[_0xf414('0xc')](_0xf414('0xd'),_0x34c4d0,_0xf414('0xe'));_0xad732(_0x2bbf01[_0xf414('0x14')][_0xf414('0x13')]);}})[_0xf414('0x15')](function(_0x483e29){logger[_0xf414('0x11')](_0xf414('0xd'),_0x34c4d0,_0x483e29);_0x5194e5(_0x483e29);});});}
\ No newline at end of file