Built motion from commit (unavailable).|2.5.3
[motion2.git] / server / api / voicePrefix / voicePrefix.rpc.js
index 980051e..956aae4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xeba5=['VoicePrefix,\x20%s,\x20%s','message','catch','lodash','util','moment','bluebird','../../mysqldb','../../config/utils','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','request','then','info','request\x20sent','debug','error','code'];(function(_0x23cd34,_0xe7e8f7){var _0x1e1e48=function(_0x820992){while(--_0x820992){_0x23cd34['push'](_0x23cd34['shift']());}};_0x1e1e48(++_0xe7e8f7);}(_0xeba5,0xd2));var _0x5eba=function(_0x1a7103,_0x1237a1){_0x1a7103=_0x1a7103-0x0;var _0x285563=_0xeba5[_0x1a7103];return _0x285563;};'use strict';var _=require(_0x5eba('0x0'));var util=require(_0x5eba('0x1'));var moment=require(_0x5eba('0x2'));var BPromise=require(_0x5eba('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x5eba('0x4'))['db'];var utils=require(_0x5eba('0x5'));var logger=require('../../config/logger')('rpc');var config=require('../../config/environment');var jayson=require(_0x5eba('0x6'));var client=jayson[_0x5eba('0x7')][_0x5eba('0x8')]({'port':0x232a});config[_0x5eba('0x9')]=_[_0x5eba('0xa')](config[_0x5eba('0x9')],{'host':_0x5eba('0xb'),'port':0x18eb});var socket=require(_0x5eba('0xc'))(new Redis(config[_0x5eba('0x9')]));require('./voicePrefix.socket')['register'](socket);function respondWithRpcPromise(_0x5819e3,_0x262e88,_0x2497ca){return new BPromise(function(_0x4f0fcf,_0x149831){return client[_0x5eba('0xd')](_0x5819e3,_0x2497ca)[_0x5eba('0xe')](function(_0xeff21b){logger[_0x5eba('0xf')]('VoicePrefix,\x20%s,\x20%s',_0x262e88,_0x5eba('0x10'));logger[_0x5eba('0x11')]('VoicePrefix,\x20%s,\x20%s,\x20%s',_0x262e88,'request\x20sent',JSON['stringify'](_0xeff21b));if(_0xeff21b[_0x5eba('0x12')]){if(_0xeff21b[_0x5eba('0x12')][_0x5eba('0x13')]===0x1f4){logger['error'](_0x5eba('0x14'),_0x262e88,_0xeff21b[_0x5eba('0x12')][_0x5eba('0x15')]);return _0x149831(_0xeff21b['error'][_0x5eba('0x15')]);}logger[_0x5eba('0x12')](_0x5eba('0x14'),_0x262e88,_0xeff21b[_0x5eba('0x12')]['message']);return _0x4f0fcf(_0xeff21b[_0x5eba('0x12')][_0x5eba('0x15')]);}else{logger['info'](_0x5eba('0x14'),_0x262e88,_0x5eba('0x10'));_0x4f0fcf(_0xeff21b['result'][_0x5eba('0x15')]);}})[_0x5eba('0x16')](function(_0x3910e4){logger[_0x5eba('0x12')](_0x5eba('0x14'),_0x262e88,_0x3910e4);_0x149831(_0x3910e4);});});}
\ No newline at end of file
+var _0xda1e=['register','request','then','request\x20sent','debug','VoicePrefix,\x20%s,\x20%s,\x20%s','error','VoicePrefix,\x20%s,\x20%s','message','info','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','redis','defaults','./voicePrefix.socket'];(function(_0x3fcd33,_0x2fe1ba){var _0x437ebd=function(_0x4ea902){while(--_0x4ea902){_0x3fcd33['push'](_0x3fcd33['shift']());}};_0x437ebd(++_0x2fe1ba);}(_0xda1e,0xeb));var _0xeda1=function(_0x3ab46c,_0x4d26cc){_0x3ab46c=_0x3ab46c-0x0;var _0x2c7e90=_0xda1e[_0x3ab46c];return _0x2c7e90;};'use strict';var _=require(_0xeda1('0x0'));var util=require('util');var moment=require(_0xeda1('0x1'));var BPromise=require(_0xeda1('0x2'));var rs=require(_0xeda1('0x3'));var fs=require('fs');var Redis=require(_0xeda1('0x4'));var db=require(_0xeda1('0x5'))['db'];var utils=require(_0xeda1('0x6'));var logger=require(_0xeda1('0x7'))(_0xeda1('0x8'));var config=require(_0xeda1('0x9'));var jayson=require('jayson/promise');var client=jayson[_0xeda1('0xa')][_0xeda1('0xb')]({'port':0x232a});config[_0xeda1('0xc')]=_[_0xeda1('0xd')](config[_0xeda1('0xc')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0xeda1('0xe'))[_0xeda1('0xf')](socket);function respondWithRpcPromise(_0x1f6708,_0x58b013,_0x28bde1){return new BPromise(function(_0x293001,_0x1161e6){return client[_0xeda1('0x10')](_0x1f6708,_0x28bde1)[_0xeda1('0x11')](function(_0x3f01fd){logger['info']('VoicePrefix,\x20%s,\x20%s',_0x58b013,_0xeda1('0x12'));logger[_0xeda1('0x13')](_0xeda1('0x14'),_0x58b013,_0xeda1('0x12'),JSON['stringify'](_0x3f01fd));if(_0x3f01fd['error']){if(_0x3f01fd[_0xeda1('0x15')]['code']===0x1f4){logger['error'](_0xeda1('0x16'),_0x58b013,_0x3f01fd[_0xeda1('0x15')][_0xeda1('0x17')]);return _0x1161e6(_0x3f01fd[_0xeda1('0x15')]['message']);}logger[_0xeda1('0x15')](_0xeda1('0x16'),_0x58b013,_0x3f01fd[_0xeda1('0x15')][_0xeda1('0x17')]);return _0x293001(_0x3f01fd[_0xeda1('0x15')][_0xeda1('0x17')]);}else{logger[_0xeda1('0x18')](_0xeda1('0x16'),_0x58b013,_0xeda1('0x12'));_0x293001(_0x3f01fd['result']['message']);}})['catch'](function(_0xfa39d){logger[_0xeda1('0x15')](_0xeda1('0x16'),_0x58b013,_0xfa39d);_0x1161e6(_0xfa39d);});});}
\ No newline at end of file