Built motion from commit (unavailable).|2.5.23
[motion2.git] / server / api / team / team.rpc.js
index ea441c0..af83384 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4e82=['defaults','redis','localhost','socket.io-emitter','./team.socket','request','then','Team,\x20%s,\x20%s','debug','Team,\x20%s,\x20%s,\x20%s','stringify','error','code','message','request\x20sent','catch','lodash','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http'];(function(_0x167cc1,_0x56ef5a){var _0x10bc4b=function(_0xd6a255){while(--_0xd6a255){_0x167cc1['push'](_0x167cc1['shift']());}};_0x10bc4b(++_0x56ef5a);}(_0x4e82,0xe8));var _0x24e8=function(_0x4dd6c9,_0x426021){_0x4dd6c9=_0x4dd6c9-0x0;var _0x3d7ca7=_0x4e82[_0x4dd6c9];return _0x3d7ca7;};'use strict';var _=require(_0x24e8('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x24e8('0x1'));var rs=require(_0x24e8('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x24e8('0x3'))['db'];var utils=require(_0x24e8('0x4'));var logger=require(_0x24e8('0x5'))(_0x24e8('0x6'));var config=require(_0x24e8('0x7'));var jayson=require(_0x24e8('0x8'));var client=jayson[_0x24e8('0x9')][_0x24e8('0xa')]({'port':0x232a});config['redis']=_[_0x24e8('0xb')](config[_0x24e8('0xc')],{'host':_0x24e8('0xd'),'port':0x18eb});var socket=require(_0x24e8('0xe'))(new Redis(config[_0x24e8('0xc')]));require(_0x24e8('0xf'))['register'](socket);function respondWithRpcPromise(_0x1e7573,_0x496753,_0xbbffa){return new BPromise(function(_0x430067,_0x389d6b){return client[_0x24e8('0x10')](_0x1e7573,_0xbbffa)[_0x24e8('0x11')](function(_0x5bd1de){logger['info'](_0x24e8('0x12'),_0x496753,'request\x20sent');logger[_0x24e8('0x13')](_0x24e8('0x14'),_0x496753,'request\x20sent',JSON[_0x24e8('0x15')](_0x5bd1de));if(_0x5bd1de[_0x24e8('0x16')]){if(_0x5bd1de[_0x24e8('0x16')][_0x24e8('0x17')]===0x1f4){logger[_0x24e8('0x16')]('Team,\x20%s,\x20%s',_0x496753,_0x5bd1de[_0x24e8('0x16')][_0x24e8('0x18')]);return _0x389d6b(_0x5bd1de[_0x24e8('0x16')][_0x24e8('0x18')]);}logger[_0x24e8('0x16')](_0x24e8('0x12'),_0x496753,_0x5bd1de[_0x24e8('0x16')][_0x24e8('0x18')]);return _0x430067(_0x5bd1de[_0x24e8('0x16')][_0x24e8('0x18')]);}else{logger['info']('Team,\x20%s,\x20%s',_0x496753,_0x24e8('0x19'));_0x430067(_0x5bd1de['result'][_0x24e8('0x18')]);}})[_0x24e8('0x1a')](function(_0x156843){logger[_0x24e8('0x16')](_0x24e8('0x12'),_0x496753,_0x156843);_0x389d6b(_0x156843);});});}
\ No newline at end of file
+var _0x9a17=['defaults','localhost','./team.socket','register','then','info','request\x20sent','debug','stringify','error','Team,\x20%s,\x20%s','message','result','lodash','util','moment','bluebird','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','redis'];(function(_0x50fb37,_0x2f0f72){var _0x1212ee=function(_0x4079b4){while(--_0x4079b4){_0x50fb37['push'](_0x50fb37['shift']());}};_0x1212ee(++_0x2f0f72);}(_0x9a17,0xbc));var _0x79a1=function(_0x2919e2,_0x2eeea2){_0x2919e2=_0x2919e2-0x0;var _0x459272=_0x9a17[_0x2919e2];return _0x459272;};'use strict';var _=require(_0x79a1('0x0'));var util=require(_0x79a1('0x1'));var moment=require(_0x79a1('0x2'));var BPromise=require(_0x79a1('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x79a1('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x79a1('0x5'));var logger=require(_0x79a1('0x6'))(_0x79a1('0x7'));var config=require(_0x79a1('0x8'));var jayson=require(_0x79a1('0x9'));var client=jayson[_0x79a1('0xa')]['http']({'port':0x232a});config[_0x79a1('0xb')]=_[_0x79a1('0xc')](config[_0x79a1('0xb')],{'host':_0x79a1('0xd'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x79a1('0xb')]));require(_0x79a1('0xe'))[_0x79a1('0xf')](socket);function respondWithRpcPromise(_0x5f0ed8,_0x3c3341,_0x473abb){return new BPromise(function(_0x49a9ed,_0x5737f5){return client['request'](_0x5f0ed8,_0x473abb)[_0x79a1('0x10')](function(_0x2b9872){logger[_0x79a1('0x11')]('Team,\x20%s,\x20%s',_0x3c3341,_0x79a1('0x12'));logger[_0x79a1('0x13')]('Team,\x20%s,\x20%s,\x20%s',_0x3c3341,_0x79a1('0x12'),JSON[_0x79a1('0x14')](_0x2b9872));if(_0x2b9872[_0x79a1('0x15')]){if(_0x2b9872['error']['code']===0x1f4){logger['error'](_0x79a1('0x16'),_0x3c3341,_0x2b9872[_0x79a1('0x15')][_0x79a1('0x17')]);return _0x5737f5(_0x2b9872[_0x79a1('0x15')][_0x79a1('0x17')]);}logger[_0x79a1('0x15')](_0x79a1('0x16'),_0x3c3341,_0x2b9872[_0x79a1('0x15')][_0x79a1('0x17')]);return _0x49a9ed(_0x2b9872['error'][_0x79a1('0x17')]);}else{logger[_0x79a1('0x11')](_0x79a1('0x16'),_0x3c3341,_0x79a1('0x12'));_0x49a9ed(_0x2b9872[_0x79a1('0x18')][_0x79a1('0x17')]);}})['catch'](function(_0x591e9b){logger[_0x79a1('0x15')](_0x79a1('0x16'),_0x3c3341,_0x591e9b);_0x5737f5(_0x591e9b);});});}
\ No newline at end of file