Built motion from commit 10af8726.|2.6.34
[motion2.git] / server / api / team / team.rpc.js
index 9f31a38..41a5d3c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x572f=['../../config/utils','../../config/logger','rpc','jayson/promise','client','defaults','redis','localhost','socket.io-emitter','./team.socket','register','then','Team,\x20%s,\x20%s','request\x20sent','Team,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','moment','bluebird','randomstring'];(function(_0x57793f,_0x2a9483){var _0x53b093=function(_0x2aae5a){while(--_0x2aae5a){_0x57793f['push'](_0x57793f['shift']());}};_0x53b093(++_0x2a9483);}(_0x572f,0x13f));var _0xf572=function(_0x19950b,_0x53d0d7){_0x19950b=_0x19950b-0x0;var _0x3c6b41=_0x572f[_0x19950b];return _0x3c6b41;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xf572('0x0'));var BPromise=require(_0xf572('0x1'));var rs=require(_0xf572('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xf572('0x3'));var logger=require(_0xf572('0x4'))(_0xf572('0x5'));var config=require('../../config/environment');var jayson=require(_0xf572('0x6'));var client=jayson[_0xf572('0x7')]['http']({'port':0x232a});config['redis']=_[_0xf572('0x8')](config[_0xf572('0x9')],{'host':_0xf572('0xa'),'port':0x18eb});var socket=require(_0xf572('0xb'))(new Redis(config[_0xf572('0x9')]));require(_0xf572('0xc'))[_0xf572('0xd')](socket);function respondWithRpcPromise(_0xaeb0f5,_0x38576d,_0x419606){return new BPromise(function(_0x5da70b,_0x4b1320){return client['request'](_0xaeb0f5,_0x419606)[_0xf572('0xe')](function(_0x2897d9){logger['info'](_0xf572('0xf'),_0x38576d,_0xf572('0x10'));logger['debug'](_0xf572('0x11'),_0x38576d,_0xf572('0x10'),JSON[_0xf572('0x12')](_0x2897d9));if(_0x2897d9[_0xf572('0x13')]){if(_0x2897d9[_0xf572('0x13')]['code']===0x1f4){logger[_0xf572('0x13')](_0xf572('0xf'),_0x38576d,_0x2897d9[_0xf572('0x13')][_0xf572('0x14')]);return _0x4b1320(_0x2897d9['error'][_0xf572('0x14')]);}logger['error']('Team,\x20%s,\x20%s',_0x38576d,_0x2897d9[_0xf572('0x13')][_0xf572('0x14')]);return _0x5da70b(_0x2897d9[_0xf572('0x13')][_0xf572('0x14')]);}else{logger['info']('Team,\x20%s,\x20%s',_0x38576d,'request\x20sent');_0x5da70b(_0x2897d9[_0xf572('0x15')][_0xf572('0x14')]);}})[_0xf572('0x16')](function(_0x38d520){logger['error']('Team,\x20%s,\x20%s',_0x38576d,_0x38d520);_0x4b1320(_0x38d520);});});}
\ No newline at end of file
+var _0x24af=['defaults','redis','localhost','socket.io-emitter','./team.socket','register','request','then','info','Team,\x20%s,\x20%s','request\x20sent','debug','Team,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','client'];(function(_0x1511d1,_0x93c805){var _0x3f0e3f=function(_0xc1dc38){while(--_0xc1dc38){_0x1511d1['push'](_0x1511d1['shift']());}};_0x3f0e3f(++_0x93c805);}(_0x24af,0x13b));var _0xf24a=function(_0x4e029f,_0x177074){_0x4e029f=_0x4e029f-0x0;var _0x135b7e=_0x24af[_0x4e029f];return _0x135b7e;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xf24a('0x0'));var BPromise=require(_0xf24a('0x1'));var rs=require(_0xf24a('0x2'));var fs=require('fs');var Redis=require(_0xf24a('0x3'));var db=require(_0xf24a('0x4'))['db'];var utils=require(_0xf24a('0x5'));var logger=require(_0xf24a('0x6'))('rpc');var config=require('../../config/environment');var jayson=require(_0xf24a('0x7'));var client=jayson[_0xf24a('0x8')]['http']({'port':0x232a});config['redis']=_[_0xf24a('0x9')](config[_0xf24a('0xa')],{'host':_0xf24a('0xb'),'port':0x18eb});var socket=require(_0xf24a('0xc'))(new Redis(config[_0xf24a('0xa')]));require(_0xf24a('0xd'))[_0xf24a('0xe')](socket);function respondWithRpcPromise(_0x31ce41,_0x4a4b60,_0x192826){return new BPromise(function(_0x4993ea,_0x31eebb){return client[_0xf24a('0xf')](_0x31ce41,_0x192826)[_0xf24a('0x10')](function(_0x427ad){logger[_0xf24a('0x11')](_0xf24a('0x12'),_0x4a4b60,_0xf24a('0x13'));logger[_0xf24a('0x14')](_0xf24a('0x15'),_0x4a4b60,_0xf24a('0x13'),JSON[_0xf24a('0x16')](_0x427ad));if(_0x427ad[_0xf24a('0x17')]){if(_0x427ad[_0xf24a('0x17')][_0xf24a('0x18')]===0x1f4){logger[_0xf24a('0x17')](_0xf24a('0x12'),_0x4a4b60,_0x427ad[_0xf24a('0x17')][_0xf24a('0x19')]);return _0x31eebb(_0x427ad['error']['message']);}logger[_0xf24a('0x17')](_0xf24a('0x12'),_0x4a4b60,_0x427ad[_0xf24a('0x17')][_0xf24a('0x19')]);return _0x4993ea(_0x427ad[_0xf24a('0x17')]['message']);}else{logger[_0xf24a('0x11')](_0xf24a('0x12'),_0x4a4b60,_0xf24a('0x13'));_0x4993ea(_0x427ad['result']['message']);}})[_0xf24a('0x1a')](function(_0x3e9c7b){logger[_0xf24a('0x17')](_0xf24a('0x12'),_0x4a4b60,_0x3e9c7b);_0x31eebb(_0x3e9c7b);});});}
\ No newline at end of file