Built motion from commit 9e1399f3.|2.5.37
[motion2.git] / server / api / voicePrefix / voicePrefix.rpc.js
index 0875fb3..106c2ad 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf0d9=['client','redis','./voicePrefix.socket','request','then','info','VoicePrefix,\x20%s,\x20%s','request\x20sent','debug','VoicePrefix,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise'];(function(_0xc6afe9,_0x3eae56){var _0x21d51c=function(_0x28cc68){while(--_0x28cc68){_0xc6afe9['push'](_0xc6afe9['shift']());}};_0x21d51c(++_0x3eae56);}(_0xf0d9,0x78));var _0x9f0d=function(_0x1fad17,_0x480227){_0x1fad17=_0x1fad17-0x0;var _0x163eec=_0xf0d9[_0x1fad17];return _0x163eec;};'use strict';var _=require(_0x9f0d('0x0'));var util=require(_0x9f0d('0x1'));var moment=require(_0x9f0d('0x2'));var BPromise=require('bluebird');var rs=require(_0x9f0d('0x3'));var fs=require('fs');var Redis=require(_0x9f0d('0x4'));var db=require(_0x9f0d('0x5'))['db'];var utils=require(_0x9f0d('0x6'));var logger=require('../../config/logger')(_0x9f0d('0x7'));var config=require(_0x9f0d('0x8'));var jayson=require(_0x9f0d('0x9'));var client=jayson[_0x9f0d('0xa')]['http']({'port':0x232a});config['redis']=_['defaults'](config['redis'],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x9f0d('0xb')]));require(_0x9f0d('0xc'))['register'](socket);function respondWithRpcPromise(_0x41c8ef,_0x111ffe,_0x5e8f45){return new BPromise(function(_0x560c4e,_0x2e48de){return client[_0x9f0d('0xd')](_0x41c8ef,_0x5e8f45)[_0x9f0d('0xe')](function(_0x21e765){logger[_0x9f0d('0xf')](_0x9f0d('0x10'),_0x111ffe,_0x9f0d('0x11'));logger[_0x9f0d('0x12')](_0x9f0d('0x13'),_0x111ffe,_0x9f0d('0x11'),JSON[_0x9f0d('0x14')](_0x21e765));if(_0x21e765['error']){if(_0x21e765[_0x9f0d('0x15')][_0x9f0d('0x16')]===0x1f4){logger[_0x9f0d('0x15')](_0x9f0d('0x10'),_0x111ffe,_0x21e765[_0x9f0d('0x15')][_0x9f0d('0x17')]);return _0x2e48de(_0x21e765[_0x9f0d('0x15')]['message']);}logger[_0x9f0d('0x15')](_0x9f0d('0x10'),_0x111ffe,_0x21e765[_0x9f0d('0x15')][_0x9f0d('0x17')]);return _0x560c4e(_0x21e765['error'][_0x9f0d('0x17')]);}else{logger[_0x9f0d('0xf')]('VoicePrefix,\x20%s,\x20%s',_0x111ffe,_0x9f0d('0x11'));_0x560c4e(_0x21e765[_0x9f0d('0x18')][_0x9f0d('0x17')]);}})[_0x9f0d('0x19')](function(_0x34eccd){logger['error'](_0x9f0d('0x10'),_0x111ffe,_0x34eccd);_0x2e48de(_0x34eccd);});});}
\ No newline at end of file
+var _0x672a=['then','info','VoicePrefix,\x20%s,\x20%s','request\x20sent','debug','VoicePrefix,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','redis','defaults','localhost','socket.io-emitter','./voicePrefix.socket','register','request'];(function(_0x52a637,_0x26c1fb){var _0x50ecd0=function(_0x2d5bb5){while(--_0x2d5bb5){_0x52a637['push'](_0x52a637['shift']());}};_0x50ecd0(++_0x26c1fb);}(_0x672a,0x122));var _0xa672=function(_0x29a718,_0x10099d){_0x29a718=_0x29a718-0x0;var _0x5ed716=_0x672a[_0x29a718];return _0x5ed716;};'use strict';var _=require(_0xa672('0x0'));var util=require(_0xa672('0x1'));var moment=require(_0xa672('0x2'));var BPromise=require(_0xa672('0x3'));var rs=require(_0xa672('0x4'));var fs=require('fs');var Redis=require(_0xa672('0x5'));var db=require(_0xa672('0x6'))['db'];var utils=require(_0xa672('0x7'));var logger=require(_0xa672('0x8'))(_0xa672('0x9'));var config=require(_0xa672('0xa'));var jayson=require('jayson/promise');var client=jayson[_0xa672('0xb')][_0xa672('0xc')]({'port':0x232a});config[_0xa672('0xd')]=_[_0xa672('0xe')](config[_0xa672('0xd')],{'host':_0xa672('0xf'),'port':0x18eb});var socket=require(_0xa672('0x10'))(new Redis(config[_0xa672('0xd')]));require(_0xa672('0x11'))[_0xa672('0x12')](socket);function respondWithRpcPromise(_0x215c43,_0x2f2b63,_0x2c1de6){return new BPromise(function(_0x351025,_0x5ae63c){return client[_0xa672('0x13')](_0x215c43,_0x2c1de6)[_0xa672('0x14')](function(_0x59fd41){logger[_0xa672('0x15')](_0xa672('0x16'),_0x2f2b63,_0xa672('0x17'));logger[_0xa672('0x18')](_0xa672('0x19'),_0x2f2b63,_0xa672('0x17'),JSON[_0xa672('0x1a')](_0x59fd41));if(_0x59fd41[_0xa672('0x1b')]){if(_0x59fd41[_0xa672('0x1b')]['code']===0x1f4){logger[_0xa672('0x1b')](_0xa672('0x16'),_0x2f2b63,_0x59fd41['error']['message']);return _0x5ae63c(_0x59fd41[_0xa672('0x1b')]['message']);}logger['error']('VoicePrefix,\x20%s,\x20%s',_0x2f2b63,_0x59fd41[_0xa672('0x1b')]['message']);return _0x351025(_0x59fd41['error'][_0xa672('0x1c')]);}else{logger[_0xa672('0x15')](_0xa672('0x16'),_0x2f2b63,_0xa672('0x17'));_0x351025(_0x59fd41[_0xa672('0x1d')][_0xa672('0x1c')]);}})[_0xa672('0x1e')](function(_0x21817d){logger[_0xa672('0x1b')](_0xa672('0x16'),_0x2f2b63,_0x21817d);_0x5ae63c(_0x21817d);});});}
\ No newline at end of file