Built motion from commit (unavailable).|2.5.13
[motion2.git] / server / api / team / team.rpc.js
index f7585fb..2e1ddee 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x01d7=['register','request','then','info','Team,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/logger','../../config/environment','http','redis','socket.io-emitter','./team.socket'];(function(_0x5bd98b,_0x22bf1c){var _0x49efe7=function(_0x2223e8){while(--_0x2223e8){_0x5bd98b['push'](_0x5bd98b['shift']());}};_0x49efe7(++_0x22bf1c);}(_0x01d7,0x114));var _0x701d=function(_0x529214,_0x421e97){_0x529214=_0x529214-0x0;var _0x5e9e40=_0x01d7[_0x529214];return _0x5e9e40;};'use strict';var _=require(_0x701d('0x0'));var util=require(_0x701d('0x1'));var moment=require(_0x701d('0x2'));var BPromise=require(_0x701d('0x3'));var rs=require(_0x701d('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x701d('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x701d('0x6'))('rpc');var config=require(_0x701d('0x7'));var jayson=require('jayson/promise');var client=jayson['client'][_0x701d('0x8')]({'port':0x232a});config[_0x701d('0x9')]=_['defaults'](config[_0x701d('0x9')],{'host':'localhost','port':0x18eb});var socket=require(_0x701d('0xa'))(new Redis(config['redis']));require(_0x701d('0xb'))[_0x701d('0xc')](socket);function respondWithRpcPromise(_0x358d53,_0x16f23c,_0x1b053f){return new BPromise(function(_0x35c485,_0x5e133b){return client[_0x701d('0xd')](_0x358d53,_0x1b053f)[_0x701d('0xe')](function(_0xf83dce){logger[_0x701d('0xf')](_0x701d('0x10'),_0x16f23c,_0x701d('0x11'));logger[_0x701d('0x12')]('Team,\x20%s,\x20%s,\x20%s',_0x16f23c,_0x701d('0x11'),JSON[_0x701d('0x13')](_0xf83dce));if(_0xf83dce[_0x701d('0x14')]){if(_0xf83dce[_0x701d('0x14')][_0x701d('0x15')]===0x1f4){logger[_0x701d('0x14')](_0x701d('0x10'),_0x16f23c,_0xf83dce[_0x701d('0x14')][_0x701d('0x16')]);return _0x5e133b(_0xf83dce[_0x701d('0x14')][_0x701d('0x16')]);}logger[_0x701d('0x14')](_0x701d('0x10'),_0x16f23c,_0xf83dce[_0x701d('0x14')][_0x701d('0x16')]);return _0x35c485(_0xf83dce['error'][_0x701d('0x16')]);}else{logger[_0x701d('0xf')]('Team,\x20%s,\x20%s',_0x16f23c,'request\x20sent');_0x35c485(_0xf83dce[_0x701d('0x17')][_0x701d('0x16')]);}})['catch'](function(_0x56a7d9){logger[_0x701d('0x14')](_0x701d('0x10'),_0x16f23c,_0x56a7d9);_0x5e133b(_0x56a7d9);});});}
\ No newline at end of file
+var _0xa85f=['redis','defaults','localhost','socket.io-emitter','./team.socket','register','request','then','request\x20sent','Team,\x20%s,\x20%s,\x20%s','stringify','error','code','Team,\x20%s,\x20%s','message','result','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client'];(function(_0x24b562,_0x40a63e){var _0x832ee2=function(_0xcc7522){while(--_0xcc7522){_0x24b562['push'](_0x24b562['shift']());}};_0x832ee2(++_0x40a63e);}(_0xa85f,0x196));var _0xfa85=function(_0x4d0e9a,_0x5bfb13){_0x4d0e9a=_0x4d0e9a-0x0;var _0x3eb599=_0xa85f[_0x4d0e9a];return _0x3eb599;};'use strict';var _=require('lodash');var util=require(_0xfa85('0x0'));var moment=require(_0xfa85('0x1'));var BPromise=require('bluebird');var rs=require(_0xfa85('0x2'));var fs=require('fs');var Redis=require(_0xfa85('0x3'));var db=require(_0xfa85('0x4'))['db'];var utils=require(_0xfa85('0x5'));var logger=require('../../config/logger')(_0xfa85('0x6'));var config=require(_0xfa85('0x7'));var jayson=require(_0xfa85('0x8'));var client=jayson[_0xfa85('0x9')]['http']({'port':0x232a});config[_0xfa85('0xa')]=_[_0xfa85('0xb')](config[_0xfa85('0xa')],{'host':_0xfa85('0xc'),'port':0x18eb});var socket=require(_0xfa85('0xd'))(new Redis(config[_0xfa85('0xa')]));require(_0xfa85('0xe'))[_0xfa85('0xf')](socket);function respondWithRpcPromise(_0x109b46,_0x5426df,_0x234f96){return new BPromise(function(_0xea9ce2,_0x618b78){return client[_0xfa85('0x10')](_0x109b46,_0x234f96)[_0xfa85('0x11')](function(_0x3d2841){logger['info']('Team,\x20%s,\x20%s',_0x5426df,_0xfa85('0x12'));logger['debug'](_0xfa85('0x13'),_0x5426df,_0xfa85('0x12'),JSON[_0xfa85('0x14')](_0x3d2841));if(_0x3d2841[_0xfa85('0x15')]){if(_0x3d2841['error'][_0xfa85('0x16')]===0x1f4){logger[_0xfa85('0x15')](_0xfa85('0x17'),_0x5426df,_0x3d2841[_0xfa85('0x15')][_0xfa85('0x18')]);return _0x618b78(_0x3d2841[_0xfa85('0x15')]['message']);}logger[_0xfa85('0x15')](_0xfa85('0x17'),_0x5426df,_0x3d2841[_0xfa85('0x15')][_0xfa85('0x18')]);return _0xea9ce2(_0x3d2841['error']['message']);}else{logger['info'](_0xfa85('0x17'),_0x5426df,'request\x20sent');_0xea9ce2(_0x3d2841[_0xfa85('0x19')]['message']);}})['catch'](function(_0x895bd2){logger[_0xfa85('0x15')](_0xfa85('0x17'),_0x5426df,_0x895bd2);_0x618b78(_0x895bd2);});});}
\ No newline at end of file