Built motion from commit b0a9a629.|2.6.33
[motion2.git] / server / api / team / team.rpc.js
index 4e6af78..585d610 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1832=['client','http','defaults','redis','localhost','socket.io-emitter','./team.socket','register','request','then','Team,\x20%s,\x20%s','request\x20sent','debug','Team,\x20%s,\x20%s,\x20%s','stringify','error','code','message','lodash','util','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x3877c1,_0x238c29){var _0x59056a=function(_0x3567cd){while(--_0x3567cd){_0x3877c1['push'](_0x3877c1['shift']());}};_0x59056a(++_0x238c29);}(_0x1832,0x12a));var _0x2183=function(_0x6faac,_0x22057e){_0x6faac=_0x6faac-0x0;var _0x22424e=_0x1832[_0x6faac];return _0x22424e;};'use strict';var _=require(_0x2183('0x0'));var util=require(_0x2183('0x1'));var moment=require('moment');var BPromise=require(_0x2183('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x2183('0x3'));var db=require(_0x2183('0x4'))['db'];var utils=require(_0x2183('0x5'));var logger=require(_0x2183('0x6'))(_0x2183('0x7'));var config=require(_0x2183('0x8'));var jayson=require(_0x2183('0x9'));var client=jayson[_0x2183('0xa')][_0x2183('0xb')]({'port':0x232a});config['redis']=_[_0x2183('0xc')](config[_0x2183('0xd')],{'host':_0x2183('0xe'),'port':0x18eb});var socket=require(_0x2183('0xf'))(new Redis(config[_0x2183('0xd')]));require(_0x2183('0x10'))[_0x2183('0x11')](socket);function respondWithRpcPromise(_0xd36c4,_0x2ae868,_0x247234){return new BPromise(function(_0x36febf,_0x57793c){return client[_0x2183('0x12')](_0xd36c4,_0x247234)[_0x2183('0x13')](function(_0x15df69){logger['info'](_0x2183('0x14'),_0x2ae868,_0x2183('0x15'));logger[_0x2183('0x16')](_0x2183('0x17'),_0x2ae868,_0x2183('0x15'),JSON[_0x2183('0x18')](_0x15df69));if(_0x15df69[_0x2183('0x19')]){if(_0x15df69[_0x2183('0x19')][_0x2183('0x1a')]===0x1f4){logger[_0x2183('0x19')](_0x2183('0x14'),_0x2ae868,_0x15df69[_0x2183('0x19')][_0x2183('0x1b')]);return _0x57793c(_0x15df69[_0x2183('0x19')][_0x2183('0x1b')]);}logger['error']('Team,\x20%s,\x20%s',_0x2ae868,_0x15df69[_0x2183('0x19')][_0x2183('0x1b')]);return _0x36febf(_0x15df69[_0x2183('0x19')][_0x2183('0x1b')]);}else{logger['info']('Team,\x20%s,\x20%s',_0x2ae868,_0x2183('0x15'));_0x36febf(_0x15df69['result'][_0x2183('0x1b')]);}})['catch'](function(_0x12b0d5){logger[_0x2183('0x19')]('Team,\x20%s,\x20%s',_0x2ae868,_0x12b0d5);_0x57793c(_0x12b0d5);});});}
\ 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