Built motion from commit da617fac.|2.6.6
[motion2.git] / server / api / team / team.rpc.js
index 1467f1c..ca2f7f2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2433=['result','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','defaults','socket.io-emitter','redis','./team.socket','info','Team,\x20%s,\x20%s','request\x20sent','debug','Team,\x20%s,\x20%s,\x20%s','stringify','error','code','message'];(function(_0x2963ba,_0x2b6c1d){var _0x18eb91=function(_0x42c388){while(--_0x42c388){_0x2963ba['push'](_0x2963ba['shift']());}};_0x18eb91(++_0x2b6c1d);}(_0x2433,0x16d));var _0x3243=function(_0x3c40ed,_0x48f9c8){_0x3c40ed=_0x3c40ed-0x0;var _0x5aaa71=_0x2433[_0x3c40ed];return _0x5aaa71;};'use strict';var _=require('lodash');var util=require(_0x3243('0x0'));var moment=require(_0x3243('0x1'));var BPromise=require('bluebird');var rs=require(_0x3243('0x2'));var fs=require('fs');var Redis=require(_0x3243('0x3'));var db=require(_0x3243('0x4'))['db'];var utils=require(_0x3243('0x5'));var logger=require(_0x3243('0x6'))(_0x3243('0x7'));var config=require(_0x3243('0x8'));var jayson=require(_0x3243('0x9'));var client=jayson[_0x3243('0xa')][_0x3243('0xb')]({'port':0x232a});config['redis']=_[_0x3243('0xc')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0x3243('0xd'))(new Redis(config[_0x3243('0xe')]));require(_0x3243('0xf'))['register'](socket);function respondWithRpcPromise(_0x381a67,_0x530974,_0xb6cbf4){return new BPromise(function(_0x3f8f8d,_0x456516){return client['request'](_0x381a67,_0xb6cbf4)['then'](function(_0x724ff9){logger[_0x3243('0x10')](_0x3243('0x11'),_0x530974,_0x3243('0x12'));logger[_0x3243('0x13')](_0x3243('0x14'),_0x530974,_0x3243('0x12'),JSON[_0x3243('0x15')](_0x724ff9));if(_0x724ff9['error']){if(_0x724ff9[_0x3243('0x16')][_0x3243('0x17')]===0x1f4){logger['error']('Team,\x20%s,\x20%s',_0x530974,_0x724ff9[_0x3243('0x16')][_0x3243('0x18')]);return _0x456516(_0x724ff9[_0x3243('0x16')]['message']);}logger[_0x3243('0x16')](_0x3243('0x11'),_0x530974,_0x724ff9[_0x3243('0x16')][_0x3243('0x18')]);return _0x3f8f8d(_0x724ff9[_0x3243('0x16')][_0x3243('0x18')]);}else{logger[_0x3243('0x10')]('Team,\x20%s,\x20%s',_0x530974,_0x3243('0x12'));_0x3f8f8d(_0x724ff9[_0x3243('0x19')][_0x3243('0x18')]);}})['catch'](function(_0x2d7046){logger[_0x3243('0x16')]('Team,\x20%s,\x20%s',_0x530974,_0x2d7046);_0x456516(_0x2d7046);});});}
\ No newline at end of file
+var _0xc532=['bluebird','randomstring','ioredis','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','defaults','localhost','socket.io-emitter','redis','./team.socket','request','info','Team,\x20%s,\x20%s','request\x20sent','debug','Team,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','moment'];(function(_0x528bd4,_0x4f0985){var _0xb55bda=function(_0x4bef3a){while(--_0x4bef3a){_0x528bd4['push'](_0x528bd4['shift']());}};_0xb55bda(++_0x4f0985);}(_0xc532,0x193));var _0x2c53=function(_0x15a92d,_0x586f2a){_0x15a92d=_0x15a92d-0x0;var _0x25fe49=_0xc532[_0x15a92d];return _0x25fe49;};'use strict';var _=require(_0x2c53('0x0'));var util=require(_0x2c53('0x1'));var moment=require(_0x2c53('0x2'));var BPromise=require(_0x2c53('0x3'));var rs=require(_0x2c53('0x4'));var fs=require('fs');var Redis=require(_0x2c53('0x5'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x2c53('0x6'))(_0x2c53('0x7'));var config=require(_0x2c53('0x8'));var jayson=require(_0x2c53('0x9'));var client=jayson[_0x2c53('0xa')][_0x2c53('0xb')]({'port':0x232a});config['redis']=_[_0x2c53('0xc')](config['redis'],{'host':_0x2c53('0xd'),'port':0x18eb});var socket=require(_0x2c53('0xe'))(new Redis(config[_0x2c53('0xf')]));require(_0x2c53('0x10'))['register'](socket);function respondWithRpcPromise(_0x5995ea,_0x65e588,_0x5aaf16){return new BPromise(function(_0x226c77,_0x651293){return client[_0x2c53('0x11')](_0x5995ea,_0x5aaf16)['then'](function(_0x2c037c){logger[_0x2c53('0x12')](_0x2c53('0x13'),_0x65e588,_0x2c53('0x14'));logger[_0x2c53('0x15')](_0x2c53('0x16'),_0x65e588,_0x2c53('0x14'),JSON[_0x2c53('0x17')](_0x2c037c));if(_0x2c037c[_0x2c53('0x18')]){if(_0x2c037c[_0x2c53('0x18')][_0x2c53('0x19')]===0x1f4){logger[_0x2c53('0x18')](_0x2c53('0x13'),_0x65e588,_0x2c037c[_0x2c53('0x18')][_0x2c53('0x1a')]);return _0x651293(_0x2c037c[_0x2c53('0x18')][_0x2c53('0x1a')]);}logger[_0x2c53('0x18')](_0x2c53('0x13'),_0x65e588,_0x2c037c[_0x2c53('0x18')]['message']);return _0x226c77(_0x2c037c['error'][_0x2c53('0x1a')]);}else{logger[_0x2c53('0x12')](_0x2c53('0x13'),_0x65e588,_0x2c53('0x14'));_0x226c77(_0x2c037c[_0x2c53('0x1b')][_0x2c53('0x1a')]);}})[_0x2c53('0x1c')](function(_0x487323){logger['error']('Team,\x20%s,\x20%s',_0x65e588,_0x487323);_0x651293(_0x487323);});});}
\ No newline at end of file