Built motion from commit 97153652.|2.6.26
[motion2.git] / server / api / userNotification / userNotification.rpc.js
index 2a4c988..f1708e0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3fde=['lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','defaults','redis','socket.io-emitter','./userNotification.socket','register','then','info','UserNotification,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message'];(function(_0x3e7189,_0x35e117){var _0x137938=function(_0x1c58a5){while(--_0x1c58a5){_0x3e7189['push'](_0x3e7189['shift']());}};_0x137938(++_0x35e117);}(_0x3fde,0x68));var _0xe3fd=function(_0x57b54c,_0x54ce0d){_0x57b54c=_0x57b54c-0x0;var _0x59cc19=_0x3fde[_0x57b54c];return _0x59cc19;};'use strict';var _=require(_0xe3fd('0x0'));var util=require(_0xe3fd('0x1'));var moment=require(_0xe3fd('0x2'));var BPromise=require(_0xe3fd('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xe3fd('0x4'));var db=require(_0xe3fd('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xe3fd('0x6'))(_0xe3fd('0x7'));var config=require(_0xe3fd('0x8'));var jayson=require(_0xe3fd('0x9'));var client=jayson[_0xe3fd('0xa')][_0xe3fd('0xb')]({'port':0x232a});config['redis']=_[_0xe3fd('0xc')](config[_0xe3fd('0xd')],{'host':'localhost','port':0x18eb});var socket=require(_0xe3fd('0xe'))(new Redis(config[_0xe3fd('0xd')]));require(_0xe3fd('0xf'))[_0xe3fd('0x10')](socket);function respondWithRpcPromise(_0x231a05,_0x52ed6c,_0x49a74d){return new BPromise(function(_0x5c45cd,_0x12292a){return client['request'](_0x231a05,_0x49a74d)[_0xe3fd('0x11')](function(_0x28e7bd){logger[_0xe3fd('0x12')](_0xe3fd('0x13'),_0x52ed6c,_0xe3fd('0x14'));logger[_0xe3fd('0x15')]('UserNotification,\x20%s,\x20%s,\x20%s',_0x52ed6c,_0xe3fd('0x14'),JSON[_0xe3fd('0x16')](_0x28e7bd));if(_0x28e7bd['error']){if(_0x28e7bd[_0xe3fd('0x17')][_0xe3fd('0x18')]===0x1f4){logger[_0xe3fd('0x17')](_0xe3fd('0x13'),_0x52ed6c,_0x28e7bd[_0xe3fd('0x17')]['message']);return _0x12292a(_0x28e7bd[_0xe3fd('0x17')][_0xe3fd('0x19')]);}logger['error'](_0xe3fd('0x13'),_0x52ed6c,_0x28e7bd[_0xe3fd('0x17')]['message']);return _0x5c45cd(_0x28e7bd[_0xe3fd('0x17')][_0xe3fd('0x19')]);}else{logger[_0xe3fd('0x12')]('UserNotification,\x20%s,\x20%s',_0x52ed6c,'request\x20sent');_0x5c45cd(_0x28e7bd['result'][_0xe3fd('0x19')]);}})['catch'](function(_0x3a73d8){logger[_0xe3fd('0x17')]('UserNotification,\x20%s,\x20%s',_0x52ed6c,_0x3a73d8);_0x12292a(_0x3a73d8);});});}
\ No newline at end of file
+var _0xc59f=['stringify','error','code','message','catch','lodash','moment','bluebird','randomstring','../../config/utils','../../config/logger','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','request','then','info','UserNotification,\x20%s,\x20%s','debug','UserNotification,\x20%s,\x20%s,\x20%s','request\x20sent'];(function(_0x5ad7d0,_0x5a0449){var _0x1df266=function(_0x2e5ddc){while(--_0x2e5ddc){_0x5ad7d0['push'](_0x5ad7d0['shift']());}};_0x1df266(++_0x5a0449);}(_0xc59f,0x69));var _0xfc59=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xc59f[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0xfc59('0x0'));var util=require('util');var moment=require(_0xfc59('0x1'));var BPromise=require(_0xfc59('0x2'));var rs=require(_0xfc59('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xfc59('0x4'));var logger=require(_0xfc59('0x5'))('rpc');var config=require('../../config/environment');var jayson=require(_0xfc59('0x6'));var client=jayson[_0xfc59('0x7')][_0xfc59('0x8')]({'port':0x232a});config[_0xfc59('0x9')]=_[_0xfc59('0xa')](config['redis'],{'host':_0xfc59('0xb'),'port':0x18eb});var socket=require(_0xfc59('0xc'))(new Redis(config[_0xfc59('0x9')]));require('./userNotification.socket')['register'](socket);function respondWithRpcPromise(_0x4c6adc,_0x5c483e,_0x2bef1d){return new BPromise(function(_0x4c089f,_0x51470f){return client[_0xfc59('0xd')](_0x4c6adc,_0x2bef1d)[_0xfc59('0xe')](function(_0x21f3cd){logger[_0xfc59('0xf')](_0xfc59('0x10'),_0x5c483e,'request\x20sent');logger[_0xfc59('0x11')](_0xfc59('0x12'),_0x5c483e,_0xfc59('0x13'),JSON[_0xfc59('0x14')](_0x21f3cd));if(_0x21f3cd[_0xfc59('0x15')]){if(_0x21f3cd[_0xfc59('0x15')][_0xfc59('0x16')]===0x1f4){logger[_0xfc59('0x15')](_0xfc59('0x10'),_0x5c483e,_0x21f3cd[_0xfc59('0x15')][_0xfc59('0x17')]);return _0x51470f(_0x21f3cd[_0xfc59('0x15')]['message']);}logger[_0xfc59('0x15')](_0xfc59('0x10'),_0x5c483e,_0x21f3cd['error']['message']);return _0x4c089f(_0x21f3cd[_0xfc59('0x15')][_0xfc59('0x17')]);}else{logger[_0xfc59('0xf')](_0xfc59('0x10'),_0x5c483e,_0xfc59('0x13'));_0x4c089f(_0x21f3cd['result']['message']);}})[_0xfc59('0x18')](function(_0x4b5efd){logger[_0xfc59('0x15')](_0xfc59('0x10'),_0x5c483e,_0x4b5efd);_0x51470f(_0x4b5efd);});});}
\ No newline at end of file