Built motion from commit 9d0783e6.|2.6.13
[motion2.git] / server / api / team / team.rpc.js
index c67e683..6eb379a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5aff=['./team.socket','register','then','request\x20sent','Team,\x20%s,\x20%s,\x20%s','stringify','error','code','Team,\x20%s,\x20%s','message','result','catch','util','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','redis','localhost','socket.io-emitter'];(function(_0x491b60,_0x4dcc2c){var _0x461a23=function(_0x292283){while(--_0x292283){_0x491b60['push'](_0x491b60['shift']());}};_0x461a23(++_0x4dcc2c);}(_0x5aff,0x15c));var _0xf5af=function(_0x18f439,_0x5e8798){_0x18f439=_0x18f439-0x0;var _0x22ff4f=_0x5aff[_0x18f439];return _0x22ff4f;};'use strict';var _=require('lodash');var util=require(_0xf5af('0x0'));var moment=require('moment');var BPromise=require(_0xf5af('0x1'));var rs=require(_0xf5af('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xf5af('0x3'))['db'];var utils=require(_0xf5af('0x4'));var logger=require(_0xf5af('0x5'))(_0xf5af('0x6'));var config=require(_0xf5af('0x7'));var jayson=require(_0xf5af('0x8'));var client=jayson['client']['http']({'port':0x232a});config[_0xf5af('0x9')]=_['defaults'](config['redis'],{'host':_0xf5af('0xa'),'port':0x18eb});var socket=require(_0xf5af('0xb'))(new Redis(config[_0xf5af('0x9')]));require(_0xf5af('0xc'))[_0xf5af('0xd')](socket);function respondWithRpcPromise(_0x3823cc,_0x4c41af,_0x48abe6){return new BPromise(function(_0x4b4b4d,_0x28a003){return client['request'](_0x3823cc,_0x48abe6)[_0xf5af('0xe')](function(_0x401878){logger['info']('Team,\x20%s,\x20%s',_0x4c41af,_0xf5af('0xf'));logger['debug'](_0xf5af('0x10'),_0x4c41af,_0xf5af('0xf'),JSON[_0xf5af('0x11')](_0x401878));if(_0x401878['error']){if(_0x401878[_0xf5af('0x12')][_0xf5af('0x13')]===0x1f4){logger[_0xf5af('0x12')](_0xf5af('0x14'),_0x4c41af,_0x401878['error'][_0xf5af('0x15')]);return _0x28a003(_0x401878[_0xf5af('0x12')]['message']);}logger[_0xf5af('0x12')](_0xf5af('0x14'),_0x4c41af,_0x401878[_0xf5af('0x12')]['message']);return _0x4b4b4d(_0x401878[_0xf5af('0x12')][_0xf5af('0x15')]);}else{logger['info'](_0xf5af('0x14'),_0x4c41af,'request\x20sent');_0x4b4b4d(_0x401878[_0xf5af('0x16')][_0xf5af('0x15')]);}})[_0xf5af('0x17')](function(_0x5063f2){logger[_0xf5af('0x12')](_0xf5af('0x14'),_0x4c41af,_0x5063f2);_0x28a003(_0x5063f2);});});}
\ No newline at end of file
+var _0xca5e=['stringify','error','code','message','Team,\x20%s,\x20%s','result','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','redis','defaults','localhost','socket.io-emitter','./team.socket','register','request','then','info','request\x20sent','debug'];(function(_0x1d50f2,_0x3c3ec6){var _0x3769b8=function(_0x50926a){while(--_0x50926a){_0x1d50f2['push'](_0x1d50f2['shift']());}};_0x3769b8(++_0x3c3ec6);}(_0xca5e,0x1ec));var _0xeca5=function(_0x221c2e,_0x7f3fad){_0x221c2e=_0x221c2e-0x0;var _0x50d0c8=_0xca5e[_0x221c2e];return _0x50d0c8;};'use strict';var _=require(_0xeca5('0x0'));var util=require(_0xeca5('0x1'));var moment=require(_0xeca5('0x2'));var BPromise=require(_0xeca5('0x3'));var rs=require(_0xeca5('0x4'));var fs=require('fs');var Redis=require(_0xeca5('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0xeca5('0x6'));var logger=require(_0xeca5('0x7'))(_0xeca5('0x8'));var config=require(_0xeca5('0x9'));var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});config[_0xeca5('0xa')]=_[_0xeca5('0xb')](config[_0xeca5('0xa')],{'host':_0xeca5('0xc'),'port':0x18eb});var socket=require(_0xeca5('0xd'))(new Redis(config[_0xeca5('0xa')]));require(_0xeca5('0xe'))[_0xeca5('0xf')](socket);function respondWithRpcPromise(_0x540de5,_0x544b7d,_0x56d525){return new BPromise(function(_0x4027fe,_0x1cc4d1){return client[_0xeca5('0x10')](_0x540de5,_0x56d525)[_0xeca5('0x11')](function(_0x402c0c){logger[_0xeca5('0x12')]('Team,\x20%s,\x20%s',_0x544b7d,_0xeca5('0x13'));logger[_0xeca5('0x14')]('Team,\x20%s,\x20%s,\x20%s',_0x544b7d,_0xeca5('0x13'),JSON[_0xeca5('0x15')](_0x402c0c));if(_0x402c0c[_0xeca5('0x16')]){if(_0x402c0c[_0xeca5('0x16')][_0xeca5('0x17')]===0x1f4){logger[_0xeca5('0x16')]('Team,\x20%s,\x20%s',_0x544b7d,_0x402c0c[_0xeca5('0x16')][_0xeca5('0x18')]);return _0x1cc4d1(_0x402c0c[_0xeca5('0x16')]['message']);}logger[_0xeca5('0x16')](_0xeca5('0x19'),_0x544b7d,_0x402c0c[_0xeca5('0x16')][_0xeca5('0x18')]);return _0x4027fe(_0x402c0c[_0xeca5('0x16')][_0xeca5('0x18')]);}else{logger['info'](_0xeca5('0x19'),_0x544b7d,_0xeca5('0x13'));_0x4027fe(_0x402c0c[_0xeca5('0x1a')][_0xeca5('0x18')]);}})['catch'](function(_0x337efb){logger[_0xeca5('0x16')](_0xeca5('0x19'),_0x544b7d,_0x337efb);_0x1cc4d1(_0x337efb);});});}
\ No newline at end of file