Built motion from commit 092f8824.|2.5.49
[motion2.git] / server / api / userNotification / userNotification.rpc.js
index a788ae3..8aa3040 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x24ef=['code','message','info','catch','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','defaults','redis','localhost','register','request','UserNotification,\x20%s,\x20%s','request\x20sent','debug','UserNotification,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0x2b49bc,_0x47b636){var _0x43cc65=function(_0x236ec3){while(--_0x236ec3){_0x2b49bc['push'](_0x2b49bc['shift']());}};_0x43cc65(++_0x47b636);}(_0x24ef,0x124));var _0xf24e=function(_0x3be244,_0x8d6c7e){_0x3be244=_0x3be244-0x0;var _0x256e64=_0x24ef[_0x3be244];return _0x256e64;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require(_0xf24e('0x0'));var rs=require(_0xf24e('0x1'));var fs=require('fs');var Redis=require(_0xf24e('0x2'));var db=require('../../mysqldb')['db'];var utils=require(_0xf24e('0x3'));var logger=require(_0xf24e('0x4'))(_0xf24e('0x5'));var config=require(_0xf24e('0x6'));var jayson=require(_0xf24e('0x7'));var client=jayson[_0xf24e('0x8')]['http']({'port':0x232a});config['redis']=_[_0xf24e('0x9')](config[_0xf24e('0xa')],{'host':_0xf24e('0xb'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xf24e('0xa')]));require('./userNotification.socket')[_0xf24e('0xc')](socket);function respondWithRpcPromise(_0x22d4b2,_0x3d85e8,_0x854917){return new BPromise(function(_0x1e8953,_0x58516f){return client[_0xf24e('0xd')](_0x22d4b2,_0x854917)['then'](function(_0x45f086){logger['info'](_0xf24e('0xe'),_0x3d85e8,_0xf24e('0xf'));logger[_0xf24e('0x10')](_0xf24e('0x11'),_0x3d85e8,_0xf24e('0xf'),JSON[_0xf24e('0x12')](_0x45f086));if(_0x45f086[_0xf24e('0x13')]){if(_0x45f086[_0xf24e('0x13')][_0xf24e('0x14')]===0x1f4){logger[_0xf24e('0x13')](_0xf24e('0xe'),_0x3d85e8,_0x45f086[_0xf24e('0x13')][_0xf24e('0x15')]);return _0x58516f(_0x45f086[_0xf24e('0x13')][_0xf24e('0x15')]);}logger['error'](_0xf24e('0xe'),_0x3d85e8,_0x45f086[_0xf24e('0x13')][_0xf24e('0x15')]);return _0x1e8953(_0x45f086[_0xf24e('0x13')][_0xf24e('0x15')]);}else{logger[_0xf24e('0x16')](_0xf24e('0xe'),_0x3d85e8,'request\x20sent');_0x1e8953(_0x45f086['result']['message']);}})[_0xf24e('0x17')](function(_0x58a7b2){logger[_0xf24e('0x13')](_0xf24e('0xe'),_0x3d85e8,_0x58a7b2);_0x58516f(_0x58a7b2);});});}
\ No newline at end of file
+var _0xafe1=['result','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','redis','localhost','register','then','info','UserNotification,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message'];(function(_0xb37e35,_0x4fe1f3){var _0x5d7734=function(_0x2fcfce){while(--_0x2fcfce){_0xb37e35['push'](_0xb37e35['shift']());}};_0x5d7734(++_0x4fe1f3);}(_0xafe1,0x1a1));var _0x1afe=function(_0x102c64,_0x3d041e){_0x102c64=_0x102c64-0x0;var _0x4a3b73=_0xafe1[_0x102c64];return _0x4a3b73;};'use strict';var _=require(_0x1afe('0x0'));var util=require(_0x1afe('0x1'));var moment=require(_0x1afe('0x2'));var BPromise=require(_0x1afe('0x3'));var rs=require(_0x1afe('0x4'));var fs=require('fs');var Redis=require(_0x1afe('0x5'));var db=require(_0x1afe('0x6'))['db'];var utils=require(_0x1afe('0x7'));var logger=require(_0x1afe('0x8'))(_0x1afe('0x9'));var config=require('../../config/environment');var jayson=require(_0x1afe('0xa'));var client=jayson[_0x1afe('0xb')][_0x1afe('0xc')]({'port':0x232a});config[_0x1afe('0xd')]=_['defaults'](config[_0x1afe('0xd')],{'host':_0x1afe('0xe'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x1afe('0xd')]));require('./userNotification.socket')[_0x1afe('0xf')](socket);function respondWithRpcPromise(_0xebeeea,_0xa1601e,_0x88c2eb){return new BPromise(function(_0x59f6b3,_0x2d8f45){return client['request'](_0xebeeea,_0x88c2eb)[_0x1afe('0x10')](function(_0x44438b){logger[_0x1afe('0x11')](_0x1afe('0x12'),_0xa1601e,_0x1afe('0x13'));logger[_0x1afe('0x14')]('UserNotification,\x20%s,\x20%s,\x20%s',_0xa1601e,_0x1afe('0x13'),JSON[_0x1afe('0x15')](_0x44438b));if(_0x44438b[_0x1afe('0x16')]){if(_0x44438b[_0x1afe('0x16')][_0x1afe('0x17')]===0x1f4){logger['error'](_0x1afe('0x12'),_0xa1601e,_0x44438b[_0x1afe('0x16')][_0x1afe('0x18')]);return _0x2d8f45(_0x44438b[_0x1afe('0x16')]['message']);}logger[_0x1afe('0x16')]('UserNotification,\x20%s,\x20%s',_0xa1601e,_0x44438b[_0x1afe('0x16')][_0x1afe('0x18')]);return _0x59f6b3(_0x44438b[_0x1afe('0x16')][_0x1afe('0x18')]);}else{logger[_0x1afe('0x11')](_0x1afe('0x12'),_0xa1601e,_0x1afe('0x13'));_0x59f6b3(_0x44438b[_0x1afe('0x19')][_0x1afe('0x18')]);}})['catch'](function(_0x35e3be){logger['error'](_0x1afe('0x12'),_0xa1601e,_0x35e3be);_0x2d8f45(_0x35e3be);});});}
\ No newline at end of file