Built motion from commit da617fac.|2.6.6
[motion2.git] / server / api / smsMessage / smsMessage.rpc.js
index 5ca7d1b..f718a76 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9a12=['bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','redis','defaults','socket.io-emitter','register','then','info','SmsMessage,\x20%s,\x20%s','request\x20sent','error','message','result','catch','CreateSmsMessage','create','body','options','raw','debug','lodash','util','moment'];(function(_0x54c1b1,_0x1d82c8){var _0x183eaf=function(_0x5c3b0f){while(--_0x5c3b0f){_0x54c1b1['push'](_0x54c1b1['shift']());}};_0x183eaf(++_0x1d82c8);}(_0x9a12,0x10b));var _0x29a1=function(_0x50bb02,_0x37cc2b){_0x50bb02=_0x50bb02-0x0;var _0x580a99=_0x9a12[_0x50bb02];return _0x580a99;};'use strict';var _=require(_0x29a1('0x0'));var util=require(_0x29a1('0x1'));var moment=require(_0x29a1('0x2'));var BPromise=require(_0x29a1('0x3'));var rs=require(_0x29a1('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x29a1('0x5'))['db'];var utils=require(_0x29a1('0x6'));var logger=require(_0x29a1('0x7'))(_0x29a1('0x8'));var config=require(_0x29a1('0x9'));var jayson=require(_0x29a1('0xa'));var client=jayson['client'][_0x29a1('0xb')]({'port':0x232a});config[_0x29a1('0xc')]=_[_0x29a1('0xd')](config[_0x29a1('0xc')],{'host':'localhost','port':0x18eb});var socket=require(_0x29a1('0xe'))(new Redis(config['redis']));require('./smsMessage.socket')[_0x29a1('0xf')](socket);function respondWithRpcPromise(_0x13eb73,_0x19ed65,_0x2a3896){return new BPromise(function(_0xaf4cc2,_0x53cdbe){return client['request'](_0x13eb73,_0x2a3896)[_0x29a1('0x10')](function(_0x4e05c0){logger[_0x29a1('0x11')](_0x29a1('0x12'),_0x19ed65,_0x29a1('0x13'));logger['debug']('SmsMessage,\x20%s,\x20%s,\x20%s',_0x19ed65,_0x29a1('0x13'),JSON['stringify'](_0x4e05c0));if(_0x4e05c0[_0x29a1('0x14')]){if(_0x4e05c0[_0x29a1('0x14')]['code']===0x1f4){logger[_0x29a1('0x14')]('SmsMessage,\x20%s,\x20%s',_0x19ed65,_0x4e05c0[_0x29a1('0x14')][_0x29a1('0x15')]);return _0x53cdbe(_0x4e05c0[_0x29a1('0x14')][_0x29a1('0x15')]);}logger[_0x29a1('0x14')]('SmsMessage,\x20%s,\x20%s',_0x19ed65,_0x4e05c0[_0x29a1('0x14')]['message']);return _0xaf4cc2(_0x4e05c0[_0x29a1('0x14')][_0x29a1('0x15')]);}else{logger[_0x29a1('0x11')]('SmsMessage,\x20%s,\x20%s',_0x19ed65,_0x29a1('0x13'));_0xaf4cc2(_0x4e05c0[_0x29a1('0x16')]['message']);}})[_0x29a1('0x17')](function(_0x53ad83){logger[_0x29a1('0x14')](_0x29a1('0x12'),_0x19ed65,_0x53ad83);_0x53cdbe(_0x53ad83);});});}exports[_0x29a1('0x18')]=function(_0x26b2ce){var _0x562763=this;return new Promise(function(_0x2ed735,_0x9204a8){return db['SmsMessage'][_0x29a1('0x19')](_0x26b2ce[_0x29a1('0x1a')],{'raw':_0x26b2ce[_0x29a1('0x1b')]?_0x26b2ce['options'][_0x29a1('0x1c')]===undefined?!![]:![]:!![]})['then'](function(_0x9f9cad){logger[_0x29a1('0x11')]('CreateSmsMessage',_0x26b2ce);logger[_0x29a1('0x1d')](_0x29a1('0x18'),_0x26b2ce,JSON['stringify'](_0x9f9cad));_0x2ed735(_0x9f9cad);})[_0x29a1('0x17')](function(_0x202c9b){logger[_0x29a1('0x14')](_0x29a1('0x18'),_0x202c9b[_0x29a1('0x15')],_0x26b2ce);_0x9204a8(_0x562763[_0x29a1('0x14')](0x1f4,_0x202c9b[_0x29a1('0x15')]));});});};
\ No newline at end of file
+var _0xcbca=['message','SmsMessage,\x20%s,\x20%s','info','catch','CreateSmsMessage','SmsMessage','create','body','options','raw','lodash','util','moment','bluebird','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./smsMessage.socket','register','request','then','debug','request\x20sent','stringify','error','code'];(function(_0x1cd6a7,_0x3de156){var _0x1033e4=function(_0x3798e2){while(--_0x3798e2){_0x1cd6a7['push'](_0x1cd6a7['shift']());}};_0x1033e4(++_0x3de156);}(_0xcbca,0x96));var _0xacbc=function(_0x256ffb,_0x103b45){_0x256ffb=_0x256ffb-0x0;var _0x2ab707=_0xcbca[_0x256ffb];return _0x2ab707;};'use strict';var _=require(_0xacbc('0x0'));var util=require(_0xacbc('0x1'));var moment=require(_0xacbc('0x2'));var BPromise=require(_0xacbc('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xacbc('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xacbc('0x5'));var logger=require(_0xacbc('0x6'))(_0xacbc('0x7'));var config=require(_0xacbc('0x8'));var jayson=require(_0xacbc('0x9'));var client=jayson[_0xacbc('0xa')][_0xacbc('0xb')]({'port':0x232a});config[_0xacbc('0xc')]=_[_0xacbc('0xd')](config[_0xacbc('0xc')],{'host':_0xacbc('0xe'),'port':0x18eb});var socket=require(_0xacbc('0xf'))(new Redis(config[_0xacbc('0xc')]));require(_0xacbc('0x10'))[_0xacbc('0x11')](socket);function respondWithRpcPromise(_0x2cc127,_0x60e5fc,_0x181793){return new BPromise(function(_0x2b5343,_0x35c218){return client[_0xacbc('0x12')](_0x2cc127,_0x181793)[_0xacbc('0x13')](function(_0x24ff1f){logger['info']('SmsMessage,\x20%s,\x20%s',_0x60e5fc,'request\x20sent');logger[_0xacbc('0x14')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x60e5fc,_0xacbc('0x15'),JSON[_0xacbc('0x16')](_0x24ff1f));if(_0x24ff1f['error']){if(_0x24ff1f[_0xacbc('0x17')][_0xacbc('0x18')]===0x1f4){logger[_0xacbc('0x17')]('SmsMessage,\x20%s,\x20%s',_0x60e5fc,_0x24ff1f[_0xacbc('0x17')][_0xacbc('0x19')]);return _0x35c218(_0x24ff1f[_0xacbc('0x17')][_0xacbc('0x19')]);}logger[_0xacbc('0x17')](_0xacbc('0x1a'),_0x60e5fc,_0x24ff1f[_0xacbc('0x17')][_0xacbc('0x19')]);return _0x2b5343(_0x24ff1f[_0xacbc('0x17')][_0xacbc('0x19')]);}else{logger[_0xacbc('0x1b')](_0xacbc('0x1a'),_0x60e5fc,_0xacbc('0x15'));_0x2b5343(_0x24ff1f['result'][_0xacbc('0x19')]);}})[_0xacbc('0x1c')](function(_0x2d1c79){logger[_0xacbc('0x17')](_0xacbc('0x1a'),_0x60e5fc,_0x2d1c79);_0x35c218(_0x2d1c79);});});}exports[_0xacbc('0x1d')]=function(_0x29decc){var _0x43f0d0=this;return new Promise(function(_0xfc0ab7,_0x151f35){return db[_0xacbc('0x1e')][_0xacbc('0x1f')](_0x29decc[_0xacbc('0x20')],{'raw':_0x29decc[_0xacbc('0x21')]?_0x29decc['options'][_0xacbc('0x22')]===undefined?!![]:![]:!![]})[_0xacbc('0x13')](function(_0x20d2a9){logger[_0xacbc('0x1b')](_0xacbc('0x1d'),_0x29decc);logger[_0xacbc('0x14')]('CreateSmsMessage',_0x29decc,JSON[_0xacbc('0x16')](_0x20d2a9));_0xfc0ab7(_0x20d2a9);})[_0xacbc('0x1c')](function(_0x17e23a){logger[_0xacbc('0x17')]('CreateSmsMessage',_0x17e23a[_0xacbc('0x19')],_0x29decc);_0x151f35(_0x43f0d0[_0xacbc('0x17')](0x1f4,_0x17e23a['message']));});});};
\ No newline at end of file