Built motion from commit b0a9a629.|2.6.33
[motion2.git] / server / api / team / team.rpc.js
index 6b5585b..585d610 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7dfb=['error','code','message','result','catch','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','redis','localhost','socket.io-emitter','./team.socket','register','request','then','info','Team,\x20%s,\x20%s','debug','Team,\x20%s,\x20%s,\x20%s','request\x20sent'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x7dfb,0x127));var _0xb7df=function(_0x58dc25,_0x49b9d5){_0x58dc25=_0x58dc25-0x0;var _0x21b0a7=_0x7dfb[_0x58dc25];return _0x21b0a7;};'use strict';var _=require(_0xb7df('0x0'));var util=require(_0xb7df('0x1'));var moment=require(_0xb7df('0x2'));var BPromise=require(_0xb7df('0x3'));var rs=require(_0xb7df('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xb7df('0x5'))['db'];var utils=require(_0xb7df('0x6'));var logger=require(_0xb7df('0x7'))('rpc');var config=require(_0xb7df('0x8'));var jayson=require(_0xb7df('0x9'));var client=jayson[_0xb7df('0xa')][_0xb7df('0xb')]({'port':0x232a});config[_0xb7df('0xc')]=_['defaults'](config[_0xb7df('0xc')],{'host':_0xb7df('0xd'),'port':0x18eb});var socket=require(_0xb7df('0xe'))(new Redis(config[_0xb7df('0xc')]));require(_0xb7df('0xf'))[_0xb7df('0x10')](socket);function respondWithRpcPromise(_0x30f70b,_0x138b61,_0x5a9cbd){return new BPromise(function(_0x36d95f,_0x56d16b){return client[_0xb7df('0x11')](_0x30f70b,_0x5a9cbd)[_0xb7df('0x12')](function(_0x3234d2){logger[_0xb7df('0x13')](_0xb7df('0x14'),_0x138b61,'request\x20sent');logger[_0xb7df('0x15')](_0xb7df('0x16'),_0x138b61,_0xb7df('0x17'),JSON['stringify'](_0x3234d2));if(_0x3234d2[_0xb7df('0x18')]){if(_0x3234d2['error'][_0xb7df('0x19')]===0x1f4){logger[_0xb7df('0x18')]('Team,\x20%s,\x20%s',_0x138b61,_0x3234d2[_0xb7df('0x18')][_0xb7df('0x1a')]);return _0x56d16b(_0x3234d2[_0xb7df('0x18')][_0xb7df('0x1a')]);}logger[_0xb7df('0x18')]('Team,\x20%s,\x20%s',_0x138b61,_0x3234d2[_0xb7df('0x18')][_0xb7df('0x1a')]);return _0x36d95f(_0x3234d2['error'][_0xb7df('0x1a')]);}else{logger[_0xb7df('0x13')](_0xb7df('0x14'),_0x138b61,_0xb7df('0x17'));_0x36d95f(_0x3234d2[_0xb7df('0x1b')]['message']);}})[_0xb7df('0x1c')](function(_0x497608){logger[_0xb7df('0x18')](_0xb7df('0x14'),_0x138b61,_0x497608);_0x56d16b(_0x497608);});});}
\ No newline at end of file
+var _0x5911=['rpc','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','request','then','request\x20sent','Team,\x20%s,\x20%s,\x20%s','stringify','error','code','Team,\x20%s,\x20%s','message','info','result','lodash','util','moment','randomstring','ioredis','../../mysqldb'];(function(_0x12e15e,_0x270d4f){var _0x1d81bf=function(_0x25bc0f){while(--_0x25bc0f){_0x12e15e['push'](_0x12e15e['shift']());}};_0x1d81bf(++_0x270d4f);}(_0x5911,0xdb));var _0x1591=function(_0x4f1303,_0x3ec38d){_0x4f1303=_0x4f1303-0x0;var _0x508493=_0x5911[_0x4f1303];return _0x508493;};'use strict';var _=require(_0x1591('0x0'));var util=require(_0x1591('0x1'));var moment=require(_0x1591('0x2'));var BPromise=require('bluebird');var rs=require(_0x1591('0x3'));var fs=require('fs');var Redis=require(_0x1591('0x4'));var db=require(_0x1591('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x1591('0x6'));var config=require('../../config/environment');var jayson=require(_0x1591('0x7'));var client=jayson[_0x1591('0x8')][_0x1591('0x9')]({'port':0x232a});config[_0x1591('0xa')]=_[_0x1591('0xb')](config[_0x1591('0xa')],{'host':_0x1591('0xc'),'port':0x18eb});var socket=require(_0x1591('0xd'))(new Redis(config['redis']));require('./team.socket')['register'](socket);function respondWithRpcPromise(_0x4fe982,_0x18dc3b,_0x2941c1){return new BPromise(function(_0x155b73,_0x65c9c7){return client[_0x1591('0xe')](_0x4fe982,_0x2941c1)[_0x1591('0xf')](function(_0x946e43){logger['info']('Team,\x20%s,\x20%s',_0x18dc3b,_0x1591('0x10'));logger['debug'](_0x1591('0x11'),_0x18dc3b,_0x1591('0x10'),JSON[_0x1591('0x12')](_0x946e43));if(_0x946e43[_0x1591('0x13')]){if(_0x946e43[_0x1591('0x13')][_0x1591('0x14')]===0x1f4){logger[_0x1591('0x13')](_0x1591('0x15'),_0x18dc3b,_0x946e43['error'][_0x1591('0x16')]);return _0x65c9c7(_0x946e43[_0x1591('0x13')]['message']);}logger[_0x1591('0x13')](_0x1591('0x15'),_0x18dc3b,_0x946e43[_0x1591('0x13')][_0x1591('0x16')]);return _0x155b73(_0x946e43[_0x1591('0x13')][_0x1591('0x16')]);}else{logger[_0x1591('0x17')](_0x1591('0x15'),_0x18dc3b,_0x1591('0x10'));_0x155b73(_0x946e43[_0x1591('0x18')]['message']);}})['catch'](function(_0x32fa65){logger[_0x1591('0x13')]('Team,\x20%s,\x20%s',_0x18dc3b,_0x32fa65);_0x65c9c7(_0x32fa65);});});}
\ No newline at end of file