Built motion from commit (unavailable).|2.5.2
[motion2.git] / server / api / team / team.rpc.js
index 74220b7..c737268 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x39e9=['redis','defaults','localhost','socket.io-emitter','./team.socket','request','then','info','Team,\x20%s,\x20%s','debug','Team,\x20%s,\x20%s,\x20%s','stringify','error','code','message','request\x20sent','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http'];(function(_0x32674b,_0x50cba5){var _0x38d463=function(_0x298ff4){while(--_0x298ff4){_0x32674b['push'](_0x32674b['shift']());}};_0x38d463(++_0x50cba5);}(_0x39e9,0x1d0));var _0x939e=function(_0x5d4f12,_0x11e67c){_0x5d4f12=_0x5d4f12-0x0;var _0x4eb577=_0x39e9[_0x5d4f12];return _0x4eb577;};'use strict';var _=require(_0x939e('0x0'));var util=require(_0x939e('0x1'));var moment=require(_0x939e('0x2'));var BPromise=require(_0x939e('0x3'));var rs=require(_0x939e('0x4'));var fs=require('fs');var Redis=require(_0x939e('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x939e('0x6'));var logger=require(_0x939e('0x7'))(_0x939e('0x8'));var config=require(_0x939e('0x9'));var jayson=require(_0x939e('0xa'));var client=jayson['client'][_0x939e('0xb')]({'port':0x232a});config[_0x939e('0xc')]=_[_0x939e('0xd')](config['redis'],{'host':_0x939e('0xe'),'port':0x18eb});var socket=require(_0x939e('0xf'))(new Redis(config[_0x939e('0xc')]));require(_0x939e('0x10'))['register'](socket);function respondWithRpcPromise(_0x4554eb,_0x54708c,_0x2331c7){return new BPromise(function(_0x49c3fd,_0xe37f32){return client[_0x939e('0x11')](_0x4554eb,_0x2331c7)[_0x939e('0x12')](function(_0x21383d){logger[_0x939e('0x13')](_0x939e('0x14'),_0x54708c,'request\x20sent');logger[_0x939e('0x15')](_0x939e('0x16'),_0x54708c,'request\x20sent',JSON[_0x939e('0x17')](_0x21383d));if(_0x21383d[_0x939e('0x18')]){if(_0x21383d[_0x939e('0x18')][_0x939e('0x19')]===0x1f4){logger[_0x939e('0x18')]('Team,\x20%s,\x20%s',_0x54708c,_0x21383d[_0x939e('0x18')][_0x939e('0x1a')]);return _0xe37f32(_0x21383d[_0x939e('0x18')][_0x939e('0x1a')]);}logger[_0x939e('0x18')](_0x939e('0x14'),_0x54708c,_0x21383d[_0x939e('0x18')][_0x939e('0x1a')]);return _0x49c3fd(_0x21383d[_0x939e('0x18')][_0x939e('0x1a')]);}else{logger[_0x939e('0x13')](_0x939e('0x14'),_0x54708c,_0x939e('0x1b'));_0x49c3fd(_0x21383d['result'][_0x939e('0x1a')]);}})['catch'](function(_0x43d239){logger[_0x939e('0x18')](_0x939e('0x14'),_0x54708c,_0x43d239);_0xe37f32(_0x43d239);});});}
\ No newline at end of file
+var _0x4f18=['client','http','defaults','redis','localhost','socket.io-emitter','./team.socket','request','then','info','Team,\x20%s,\x20%s','request\x20sent','Team,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise'];(function(_0x160c73,_0x2ee678){var _0xd9302=function(_0x169454){while(--_0x169454){_0x160c73['push'](_0x160c73['shift']());}};_0xd9302(++_0x2ee678);}(_0x4f18,0xea));var _0x84f1=function(_0x9f6349,_0x1c5630){_0x9f6349=_0x9f6349-0x0;var _0x58ea4f=_0x4f18[_0x9f6349];return _0x58ea4f;};'use strict';var _=require('lodash');var util=require(_0x84f1('0x0'));var moment=require(_0x84f1('0x1'));var BPromise=require(_0x84f1('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x84f1('0x3'));var db=require(_0x84f1('0x4'))['db'];var utils=require(_0x84f1('0x5'));var logger=require(_0x84f1('0x6'))(_0x84f1('0x7'));var config=require('../../config/environment');var jayson=require(_0x84f1('0x8'));var client=jayson[_0x84f1('0x9')][_0x84f1('0xa')]({'port':0x232a});config['redis']=_[_0x84f1('0xb')](config[_0x84f1('0xc')],{'host':_0x84f1('0xd'),'port':0x18eb});var socket=require(_0x84f1('0xe'))(new Redis(config['redis']));require(_0x84f1('0xf'))['register'](socket);function respondWithRpcPromise(_0x37bda1,_0x40037f,_0x2680e1){return new BPromise(function(_0x1dfa44,_0x26d89a){return client[_0x84f1('0x10')](_0x37bda1,_0x2680e1)[_0x84f1('0x11')](function(_0x329f4f){logger[_0x84f1('0x12')](_0x84f1('0x13'),_0x40037f,_0x84f1('0x14'));logger['debug'](_0x84f1('0x15'),_0x40037f,_0x84f1('0x14'),JSON[_0x84f1('0x16')](_0x329f4f));if(_0x329f4f['error']){if(_0x329f4f[_0x84f1('0x17')]['code']===0x1f4){logger[_0x84f1('0x17')]('Team,\x20%s,\x20%s',_0x40037f,_0x329f4f[_0x84f1('0x17')]['message']);return _0x26d89a(_0x329f4f[_0x84f1('0x17')][_0x84f1('0x18')]);}logger[_0x84f1('0x17')](_0x84f1('0x13'),_0x40037f,_0x329f4f[_0x84f1('0x17')][_0x84f1('0x18')]);return _0x1dfa44(_0x329f4f[_0x84f1('0x17')][_0x84f1('0x18')]);}else{logger[_0x84f1('0x12')](_0x84f1('0x13'),_0x40037f,_0x84f1('0x14'));_0x1dfa44(_0x329f4f[_0x84f1('0x19')][_0x84f1('0x18')]);}})[_0x84f1('0x1a')](function(_0x3e4de3){logger['error'](_0x84f1('0x13'),_0x40037f,_0x3e4de3);_0x26d89a(_0x3e4de3);});});}
\ No newline at end of file