Built motion from commit 10af8726.|2.6.34
[motion2.git] / server / api / smsMessage / smsMessage.rpc.js
index ab1898c..365bca6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdac9=['./smsMessage.socket','register','request','then','info','request\x20sent','debug','SmsMessage,\x20%s,\x20%s,\x20%s','error','code','SmsMessage,\x20%s,\x20%s','message','result','catch','CreateSmsMessage','SmsMessage','body','lodash','util','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','redis','localhost','socket.io-emitter'];(function(_0x299113,_0x5f37bd){var _0x5ef7c4=function(_0x4c0335){while(--_0x4c0335){_0x299113['push'](_0x299113['shift']());}};_0x5ef7c4(++_0x5f37bd);}(_0xdac9,0x128));var _0x9dac=function(_0x39d39d,_0x5586bd){_0x39d39d=_0x39d39d-0x0;var _0x577ac3=_0xdac9[_0x39d39d];return _0x577ac3;};'use strict';var _=require(_0x9dac('0x0'));var util=require(_0x9dac('0x1'));var moment=require('moment');var BPromise=require(_0x9dac('0x2'));var rs=require(_0x9dac('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x9dac('0x4'))['db'];var utils=require(_0x9dac('0x5'));var logger=require(_0x9dac('0x6'))('rpc');var config=require(_0x9dac('0x7'));var jayson=require(_0x9dac('0x8'));var client=jayson[_0x9dac('0x9')][_0x9dac('0xa')]({'port':0x232a});config[_0x9dac('0xb')]=_['defaults'](config[_0x9dac('0xb')],{'host':_0x9dac('0xc'),'port':0x18eb});var socket=require(_0x9dac('0xd'))(new Redis(config[_0x9dac('0xb')]));require(_0x9dac('0xe'))[_0x9dac('0xf')](socket);function respondWithRpcPromise(_0x4bb7cf,_0x599e4b,_0x10aef5){return new BPromise(function(_0x5af50f,_0x8c626b){return client[_0x9dac('0x10')](_0x4bb7cf,_0x10aef5)[_0x9dac('0x11')](function(_0x133dc6){logger[_0x9dac('0x12')]('SmsMessage,\x20%s,\x20%s',_0x599e4b,_0x9dac('0x13'));logger[_0x9dac('0x14')](_0x9dac('0x15'),_0x599e4b,'request\x20sent',JSON['stringify'](_0x133dc6));if(_0x133dc6[_0x9dac('0x16')]){if(_0x133dc6[_0x9dac('0x16')][_0x9dac('0x17')]===0x1f4){logger[_0x9dac('0x16')](_0x9dac('0x18'),_0x599e4b,_0x133dc6[_0x9dac('0x16')][_0x9dac('0x19')]);return _0x8c626b(_0x133dc6[_0x9dac('0x16')][_0x9dac('0x19')]);}logger[_0x9dac('0x16')](_0x9dac('0x18'),_0x599e4b,_0x133dc6[_0x9dac('0x16')][_0x9dac('0x19')]);return _0x5af50f(_0x133dc6[_0x9dac('0x16')]['message']);}else{logger[_0x9dac('0x12')](_0x9dac('0x18'),_0x599e4b,_0x9dac('0x13'));_0x5af50f(_0x133dc6[_0x9dac('0x1a')]['message']);}})[_0x9dac('0x1b')](function(_0x38af12){logger[_0x9dac('0x16')]('SmsMessage,\x20%s,\x20%s',_0x599e4b,_0x38af12);_0x8c626b(_0x38af12);});});}exports[_0x9dac('0x1c')]=function(_0x511cc2){var _0x541d76=this;return new Promise(function(_0x1a828a,_0x5c4eb0){return db[_0x9dac('0x1d')]['create'](_0x511cc2[_0x9dac('0x1e')],{'raw':_0x511cc2['options']?_0x511cc2['options']['raw']===undefined?!![]:![]:!![]})[_0x9dac('0x11')](function(_0x53852f){logger[_0x9dac('0x12')]('CreateSmsMessage',_0x511cc2);logger[_0x9dac('0x14')](_0x9dac('0x1c'),_0x511cc2,JSON['stringify'](_0x53852f));_0x1a828a(_0x53852f);})[_0x9dac('0x1b')](function(_0x5363e0){logger[_0x9dac('0x16')](_0x9dac('0x1c'),_0x5363e0['message'],_0x511cc2);_0x5c4eb0(_0x541d76['error'](0x1f4,_0x5363e0[_0x9dac('0x19')]));});});};
\ No newline at end of file
+var _0x4331=['body','options','raw','info','lodash','moment','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','socket.io-emitter','register','then','SmsMessage,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','catch','CreateSmsMessage','SmsMessage','create'];(function(_0x178e48,_0x3c9509){var _0x440d7e=function(_0xc2f8a0){while(--_0xc2f8a0){_0x178e48['push'](_0x178e48['shift']());}};_0x440d7e(++_0x3c9509);}(_0x4331,0x197));var _0x1433=function(_0x29b564,_0x2d95bd){_0x29b564=_0x29b564-0x0;var _0xae0676=_0x4331[_0x29b564];return _0xae0676;};'use strict';var _=require(_0x1433('0x0'));var util=require('util');var moment=require(_0x1433('0x1'));var BPromise=require(_0x1433('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x1433('0x3'))['db'];var utils=require(_0x1433('0x4'));var logger=require(_0x1433('0x5'))(_0x1433('0x6'));var config=require(_0x1433('0x7'));var jayson=require(_0x1433('0x8'));var client=jayson[_0x1433('0x9')][_0x1433('0xa')]({'port':0x232a});config[_0x1433('0xb')]=_[_0x1433('0xc')](config[_0x1433('0xb')],{'host':'localhost','port':0x18eb});var socket=require(_0x1433('0xd'))(new Redis(config[_0x1433('0xb')]));require('./smsMessage.socket')[_0x1433('0xe')](socket);function respondWithRpcPromise(_0x421a4d,_0x47d04d,_0x18ae1c){return new BPromise(function(_0x3ee3ee,_0x4bfe97){return client['request'](_0x421a4d,_0x18ae1c)[_0x1433('0xf')](function(_0x82497d){logger['info'](_0x1433('0x10'),_0x47d04d,_0x1433('0x11'));logger[_0x1433('0x12')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x47d04d,_0x1433('0x11'),JSON[_0x1433('0x13')](_0x82497d));if(_0x82497d[_0x1433('0x14')]){if(_0x82497d[_0x1433('0x14')][_0x1433('0x15')]===0x1f4){logger[_0x1433('0x14')]('SmsMessage,\x20%s,\x20%s',_0x47d04d,_0x82497d[_0x1433('0x14')][_0x1433('0x16')]);return _0x4bfe97(_0x82497d[_0x1433('0x14')][_0x1433('0x16')]);}logger['error']('SmsMessage,\x20%s,\x20%s',_0x47d04d,_0x82497d[_0x1433('0x14')][_0x1433('0x16')]);return _0x3ee3ee(_0x82497d[_0x1433('0x14')][_0x1433('0x16')]);}else{logger['info'](_0x1433('0x10'),_0x47d04d,_0x1433('0x11'));_0x3ee3ee(_0x82497d['result'][_0x1433('0x16')]);}})[_0x1433('0x17')](function(_0x229acd){logger[_0x1433('0x14')](_0x1433('0x10'),_0x47d04d,_0x229acd);_0x4bfe97(_0x229acd);});});}exports[_0x1433('0x18')]=function(_0x523c92){var _0xfe69fe=this;return new Promise(function(_0x1ac311,_0x3f2041){return db[_0x1433('0x19')][_0x1433('0x1a')](_0x523c92[_0x1433('0x1b')],{'raw':_0x523c92[_0x1433('0x1c')]?_0x523c92['options'][_0x1433('0x1d')]===undefined?!![]:![]:!![]})[_0x1433('0xf')](function(_0x5b9c63){logger[_0x1433('0x1e')]('CreateSmsMessage',_0x523c92);logger[_0x1433('0x12')](_0x1433('0x18'),_0x523c92,JSON['stringify'](_0x5b9c63));_0x1ac311(_0x5b9c63);})[_0x1433('0x17')](function(_0x2bc90d){logger[_0x1433('0x14')](_0x1433('0x18'),_0x2bc90d['message'],_0x523c92);_0x3f2041(_0xfe69fe[_0x1433('0x14')](0x1f4,_0x2bc90d[_0x1433('0x16')]));});});};
\ No newline at end of file