Built motion from commit e1760111.|2.6.18
[motion2.git] / server / api / voicePrefix / voicePrefix.rpc.js
index 2ba6238..25a4eea 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x954a=['then','info','debug','request\x20sent','stringify','error','code','VoicePrefix,\x20%s,\x20%s','message','result','lodash','moment','bluebird','randomstring','ioredis','../../config/utils','rpc','../../config/environment','jayson/promise','client','redis','socket.io-emitter','request'];(function(_0x155b15,_0x55f0d5){var _0x30d567=function(_0x49fd85){while(--_0x49fd85){_0x155b15['push'](_0x155b15['shift']());}};_0x30d567(++_0x55f0d5);}(_0x954a,0x66));var _0xa954=function(_0x3d3720,_0x40bb41){_0x3d3720=_0x3d3720-0x0;var _0x1d90e0=_0x954a[_0x3d3720];return _0x1d90e0;};'use strict';var _=require(_0xa954('0x0'));var util=require('util');var moment=require(_0xa954('0x1'));var BPromise=require(_0xa954('0x2'));var rs=require(_0xa954('0x3'));var fs=require('fs');var Redis=require(_0xa954('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xa954('0x5'));var logger=require('../../config/logger')(_0xa954('0x6'));var config=require(_0xa954('0x7'));var jayson=require(_0xa954('0x8'));var client=jayson[_0xa954('0x9')]['http']({'port':0x232a});config[_0xa954('0xa')]=_['defaults'](config[_0xa954('0xa')],{'host':'localhost','port':0x18eb});var socket=require(_0xa954('0xb'))(new Redis(config[_0xa954('0xa')]));require('./voicePrefix.socket')['register'](socket);function respondWithRpcPromise(_0x249489,_0x4d86c5,_0x3f7e23){return new BPromise(function(_0x58789d,_0x3b7731){return client[_0xa954('0xc')](_0x249489,_0x3f7e23)[_0xa954('0xd')](function(_0x572f5f){logger[_0xa954('0xe')]('VoicePrefix,\x20%s,\x20%s',_0x4d86c5,'request\x20sent');logger[_0xa954('0xf')]('VoicePrefix,\x20%s,\x20%s,\x20%s',_0x4d86c5,_0xa954('0x10'),JSON[_0xa954('0x11')](_0x572f5f));if(_0x572f5f[_0xa954('0x12')]){if(_0x572f5f[_0xa954('0x12')][_0xa954('0x13')]===0x1f4){logger['error'](_0xa954('0x14'),_0x4d86c5,_0x572f5f[_0xa954('0x12')]['message']);return _0x3b7731(_0x572f5f[_0xa954('0x12')][_0xa954('0x15')]);}logger[_0xa954('0x12')](_0xa954('0x14'),_0x4d86c5,_0x572f5f[_0xa954('0x12')][_0xa954('0x15')]);return _0x58789d(_0x572f5f[_0xa954('0x12')]['message']);}else{logger[_0xa954('0xe')]('VoicePrefix,\x20%s,\x20%s',_0x4d86c5,'request\x20sent');_0x58789d(_0x572f5f[_0xa954('0x16')][_0xa954('0x15')]);}})['catch'](function(_0x105fdc){logger[_0xa954('0x12')](_0xa954('0x14'),_0x4d86c5,_0x105fdc);_0x3b7731(_0x105fdc);});});}
\ No newline at end of file
+var _0x6132=['message','result','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','http','redis','defaults','localhost','./voicePrefix.socket','register','request','then','info','VoicePrefix,\x20%s,\x20%s','request\x20sent','VoicePrefix,\x20%s,\x20%s,\x20%s','stringify','error','code'];(function(_0x39cc23,_0x515c44){var _0x17093d=function(_0x4daf91){while(--_0x4daf91){_0x39cc23['push'](_0x39cc23['shift']());}};_0x17093d(++_0x515c44);}(_0x6132,0x13a));var _0x2613=function(_0x1fda19,_0x504567){_0x1fda19=_0x1fda19-0x0;var _0x4b1879=_0x6132[_0x1fda19];return _0x4b1879;};'use strict';var _=require(_0x2613('0x0'));var util=require(_0x2613('0x1'));var moment=require(_0x2613('0x2'));var BPromise=require(_0x2613('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x2613('0x4'));var db=require(_0x2613('0x5'))['db'];var utils=require(_0x2613('0x6'));var logger=require(_0x2613('0x7'))('rpc');var config=require(_0x2613('0x8'));var jayson=require('jayson/promise');var client=jayson['client'][_0x2613('0x9')]({'port':0x232a});config[_0x2613('0xa')]=_[_0x2613('0xb')](config[_0x2613('0xa')],{'host':_0x2613('0xc'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x2613('0xa')]));require(_0x2613('0xd'))[_0x2613('0xe')](socket);function respondWithRpcPromise(_0x5c9af5,_0xe1a1ff,_0x12c800){return new BPromise(function(_0x6d4439,_0x37fe48){return client[_0x2613('0xf')](_0x5c9af5,_0x12c800)[_0x2613('0x10')](function(_0xcc6236){logger[_0x2613('0x11')](_0x2613('0x12'),_0xe1a1ff,_0x2613('0x13'));logger['debug'](_0x2613('0x14'),_0xe1a1ff,_0x2613('0x13'),JSON[_0x2613('0x15')](_0xcc6236));if(_0xcc6236[_0x2613('0x16')]){if(_0xcc6236['error'][_0x2613('0x17')]===0x1f4){logger[_0x2613('0x16')](_0x2613('0x12'),_0xe1a1ff,_0xcc6236[_0x2613('0x16')]['message']);return _0x37fe48(_0xcc6236[_0x2613('0x16')][_0x2613('0x18')]);}logger[_0x2613('0x16')](_0x2613('0x12'),_0xe1a1ff,_0xcc6236['error'][_0x2613('0x18')]);return _0x6d4439(_0xcc6236[_0x2613('0x16')]['message']);}else{logger[_0x2613('0x11')](_0x2613('0x12'),_0xe1a1ff,_0x2613('0x13'));_0x6d4439(_0xcc6236[_0x2613('0x19')][_0x2613('0x18')]);}})['catch'](function(_0x349c5c){logger[_0x2613('0x16')]('VoicePrefix,\x20%s,\x20%s',_0xe1a1ff,_0x349c5c);_0x37fe48(_0x349c5c);});});}
\ No newline at end of file