Built motion from commit f7863d46.|2.5.41
[motion2.git] / server / api / team / team.rpc.js
index c737268..89da0c9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-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
+var _0x49c9=['../../mysqldb','../../config/utils','../../config/logger','rpc','http','redis','defaults','socket.io-emitter','./team.socket','then','info','Team,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','lodash','moment','randomstring','ioredis'];(function(_0x289a1e,_0x3d3640){var _0x330b75=function(_0x10bade){while(--_0x10bade){_0x289a1e['push'](_0x289a1e['shift']());}};_0x330b75(++_0x3d3640);}(_0x49c9,0x9d));var _0x949c=function(_0x187c3b,_0x735efa){_0x187c3b=_0x187c3b-0x0;var _0x326167=_0x49c9[_0x187c3b];return _0x326167;};'use strict';var _=require(_0x949c('0x0'));var util=require('util');var moment=require(_0x949c('0x1'));var BPromise=require('bluebird');var rs=require(_0x949c('0x2'));var fs=require('fs');var Redis=require(_0x949c('0x3'));var db=require(_0x949c('0x4'))['db'];var utils=require(_0x949c('0x5'));var logger=require(_0x949c('0x6'))(_0x949c('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client'][_0x949c('0x8')]({'port':0x232a});config[_0x949c('0x9')]=_[_0x949c('0xa')](config[_0x949c('0x9')],{'host':'localhost','port':0x18eb});var socket=require(_0x949c('0xb'))(new Redis(config[_0x949c('0x9')]));require(_0x949c('0xc'))['register'](socket);function respondWithRpcPromise(_0x5c3aa9,_0x366594,_0x16a2c3){return new BPromise(function(_0x29a4bc,_0x5229a8){return client['request'](_0x5c3aa9,_0x16a2c3)[_0x949c('0xd')](function(_0x30ffc2){logger[_0x949c('0xe')](_0x949c('0xf'),_0x366594,_0x949c('0x10'));logger[_0x949c('0x11')]('Team,\x20%s,\x20%s,\x20%s',_0x366594,'request\x20sent',JSON[_0x949c('0x12')](_0x30ffc2));if(_0x30ffc2[_0x949c('0x13')]){if(_0x30ffc2[_0x949c('0x13')][_0x949c('0x14')]===0x1f4){logger['error'](_0x949c('0xf'),_0x366594,_0x30ffc2['error'][_0x949c('0x15')]);return _0x5229a8(_0x30ffc2[_0x949c('0x13')][_0x949c('0x15')]);}logger[_0x949c('0x13')](_0x949c('0xf'),_0x366594,_0x30ffc2['error'][_0x949c('0x15')]);return _0x29a4bc(_0x30ffc2['error']['message']);}else{logger[_0x949c('0xe')](_0x949c('0xf'),_0x366594,_0x949c('0x10'));_0x29a4bc(_0x30ffc2[_0x949c('0x16')][_0x949c('0x15')]);}})['catch'](function(_0x3f2589){logger[_0x949c('0x13')](_0x949c('0xf'),_0x366594,_0x3f2589);_0x5229a8(_0x3f2589);});});}
\ No newline at end of file