Built motion from commit (unavailable).|2.5.14
[motion2.git] / server / api / openchannelAccount / openchannelAccount.rpc.js
index 3e0ae35..fb0b44c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7bac=['debug','OpenchannelAccount,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','result','lodash','moment','bluebird','randomstring','../../config/logger','rpc','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./openchannelAccount.socket','register','request','OpenchannelAccount,\x20%s,\x20%s'];(function(_0x5eda13,_0x1c8307){var _0x501325=function(_0xe361b2){while(--_0xe361b2){_0x5eda13['push'](_0x5eda13['shift']());}};_0x501325(++_0x1c8307);}(_0x7bac,0xbf));var _0xc7ba=function(_0x59bee2,_0xab2f75){_0x59bee2=_0x59bee2-0x0;var _0x445c80=_0x7bac[_0x59bee2];return _0x445c80;};'use strict';var _=require(_0xc7ba('0x0'));var util=require('util');var moment=require(_0xc7ba('0x1'));var BPromise=require(_0xc7ba('0x2'));var rs=require(_0xc7ba('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0xc7ba('0x4'))(_0xc7ba('0x5'));var config=require('../../config/environment');var jayson=require(_0xc7ba('0x6'));var client=jayson[_0xc7ba('0x7')][_0xc7ba('0x8')]({'port':0x232a});config[_0xc7ba('0x9')]=_[_0xc7ba('0xa')](config[_0xc7ba('0x9')],{'host':_0xc7ba('0xb'),'port':0x18eb});var socket=require(_0xc7ba('0xc'))(new Redis(config['redis']));require(_0xc7ba('0xd'))[_0xc7ba('0xe')](socket);function respondWithRpcPromise(_0x7aba24,_0x51664d,_0x251670){return new BPromise(function(_0x218d84,_0x129b8b){return client[_0xc7ba('0xf')](_0x7aba24,_0x251670)['then'](function(_0x4385af){logger['info'](_0xc7ba('0x10'),_0x51664d,'request\x20sent');logger[_0xc7ba('0x11')](_0xc7ba('0x12'),_0x51664d,_0xc7ba('0x13'),JSON[_0xc7ba('0x14')](_0x4385af));if(_0x4385af[_0xc7ba('0x15')]){if(_0x4385af['error'][_0xc7ba('0x16')]===0x1f4){logger[_0xc7ba('0x15')](_0xc7ba('0x10'),_0x51664d,_0x4385af[_0xc7ba('0x15')][_0xc7ba('0x17')]);return _0x129b8b(_0x4385af[_0xc7ba('0x15')]['message']);}logger[_0xc7ba('0x15')]('OpenchannelAccount,\x20%s,\x20%s',_0x51664d,_0x4385af[_0xc7ba('0x15')][_0xc7ba('0x17')]);return _0x218d84(_0x4385af[_0xc7ba('0x15')][_0xc7ba('0x17')]);}else{logger[_0xc7ba('0x18')](_0xc7ba('0x10'),_0x51664d,_0xc7ba('0x13'));_0x218d84(_0x4385af[_0xc7ba('0x19')]['message']);}})['catch'](function(_0x193054){logger[_0xc7ba('0x15')](_0xc7ba('0x10'),_0x51664d,_0x193054);_0x129b8b(_0x193054);});});}
\ No newline at end of file
+var _0x36a8=['defaults','socket.io-emitter','./openchannelAccount.socket','register','request','then','info','OpenchannelAccount,\x20%s,\x20%s','OpenchannelAccount,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','http','redis'];(function(_0x46698a,_0x8de1e4){var _0x356db0=function(_0x19e83c){while(--_0x19e83c){_0x46698a['push'](_0x46698a['shift']());}};_0x356db0(++_0x8de1e4);}(_0x36a8,0x1cf));var _0x836a=function(_0x3d86f4,_0x2a9220){_0x3d86f4=_0x3d86f4-0x0;var _0x5d8e87=_0x36a8[_0x3d86f4];return _0x5d8e87;};'use strict';var _=require(_0x836a('0x0'));var util=require(_0x836a('0x1'));var moment=require(_0x836a('0x2'));var BPromise=require(_0x836a('0x3'));var rs=require(_0x836a('0x4'));var fs=require('fs');var Redis=require(_0x836a('0x5'));var db=require(_0x836a('0x6'))['db'];var utils=require(_0x836a('0x7'));var logger=require(_0x836a('0x8'))('rpc');var config=require(_0x836a('0x9'));var jayson=require('jayson/promise');var client=jayson[_0x836a('0xa')][_0x836a('0xb')]({'port':0x232a});config[_0x836a('0xc')]=_[_0x836a('0xd')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0x836a('0xe'))(new Redis(config[_0x836a('0xc')]));require(_0x836a('0xf'))[_0x836a('0x10')](socket);function respondWithRpcPromise(_0x4146f2,_0x2b20f9,_0x5310b0){return new BPromise(function(_0x2709a5,_0x489dc2){return client[_0x836a('0x11')](_0x4146f2,_0x5310b0)[_0x836a('0x12')](function(_0x750e3c){logger[_0x836a('0x13')](_0x836a('0x14'),_0x2b20f9,'request\x20sent');logger['debug'](_0x836a('0x15'),_0x2b20f9,_0x836a('0x16'),JSON[_0x836a('0x17')](_0x750e3c));if(_0x750e3c[_0x836a('0x18')]){if(_0x750e3c[_0x836a('0x18')]['code']===0x1f4){logger['error'](_0x836a('0x14'),_0x2b20f9,_0x750e3c['error'][_0x836a('0x19')]);return _0x489dc2(_0x750e3c[_0x836a('0x18')]['message']);}logger[_0x836a('0x18')](_0x836a('0x14'),_0x2b20f9,_0x750e3c[_0x836a('0x18')][_0x836a('0x19')]);return _0x2709a5(_0x750e3c[_0x836a('0x18')][_0x836a('0x19')]);}else{logger['info'](_0x836a('0x14'),_0x2b20f9,'request\x20sent');_0x2709a5(_0x750e3c[_0x836a('0x1a')][_0x836a('0x19')]);}})[_0x836a('0x1b')](function(_0x2f6ad8){logger[_0x836a('0x18')](_0x836a('0x14'),_0x2b20f9,_0x2f6ad8);_0x489dc2(_0x2f6ad8);});});}
\ No newline at end of file