Built motion from commit a679711e.|2.6.15
[motion2.git] / server / api / userNotification / userNotification.rpc.js
index b65bf73..47b5fec 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5ac4=['socket.io-emitter','register','request','then','UserNotification,\x20%s,\x20%s','request\x20sent','debug','UserNotification,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','lodash','util','moment','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x5ac4,0xbd));var _0x45ac=function(_0x2ea896,_0x1bd4b4){_0x2ea896=_0x2ea896-0x0;var _0x5c5d41=_0x5ac4[_0x2ea896];return _0x5c5d41;};'use strict';var _=require(_0x45ac('0x0'));var util=require(_0x45ac('0x1'));var moment=require(_0x45ac('0x2'));var BPromise=require('bluebird');var rs=require(_0x45ac('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x45ac('0x4'))['db'];var utils=require(_0x45ac('0x5'));var logger=require(_0x45ac('0x6'))(_0x45ac('0x7'));var config=require(_0x45ac('0x8'));var jayson=require(_0x45ac('0x9'));var client=jayson[_0x45ac('0xa')][_0x45ac('0xb')]({'port':0x232a});config[_0x45ac('0xc')]=_[_0x45ac('0xd')](config[_0x45ac('0xc')],{'host':'localhost','port':0x18eb});var socket=require(_0x45ac('0xe'))(new Redis(config[_0x45ac('0xc')]));require('./userNotification.socket')[_0x45ac('0xf')](socket);function respondWithRpcPromise(_0x3930f2,_0x58fef2,_0x347e2b){return new BPromise(function(_0x57b010,_0x4d1022){return client[_0x45ac('0x10')](_0x3930f2,_0x347e2b)[_0x45ac('0x11')](function(_0x3d896c){logger['info'](_0x45ac('0x12'),_0x58fef2,_0x45ac('0x13'));logger[_0x45ac('0x14')](_0x45ac('0x15'),_0x58fef2,_0x45ac('0x13'),JSON[_0x45ac('0x16')](_0x3d896c));if(_0x3d896c[_0x45ac('0x17')]){if(_0x3d896c[_0x45ac('0x17')][_0x45ac('0x18')]===0x1f4){logger[_0x45ac('0x17')](_0x45ac('0x12'),_0x58fef2,_0x3d896c[_0x45ac('0x17')][_0x45ac('0x19')]);return _0x4d1022(_0x3d896c[_0x45ac('0x17')][_0x45ac('0x19')]);}logger[_0x45ac('0x17')](_0x45ac('0x12'),_0x58fef2,_0x3d896c[_0x45ac('0x17')][_0x45ac('0x19')]);return _0x57b010(_0x3d896c[_0x45ac('0x17')]['message']);}else{logger[_0x45ac('0x1a')](_0x45ac('0x12'),_0x58fef2,_0x45ac('0x13'));_0x57b010(_0x3d896c[_0x45ac('0x1b')][_0x45ac('0x19')]);}})[_0x45ac('0x1c')](function(_0x373188){logger['error']('UserNotification,\x20%s,\x20%s',_0x58fef2,_0x373188);_0x4d1022(_0x373188);});});}
\ No newline at end of file
+var _0x771f=['UserNotification,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','util','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','defaults','redis','socket.io-emitter','./userNotification.socket','register','then','info','UserNotification,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x34ad37,_0x5ee0dd){var _0x428c43=function(_0x400320){while(--_0x400320){_0x34ad37['push'](_0x34ad37['shift']());}};_0x428c43(++_0x5ee0dd);}(_0x771f,0x10a));var _0xf771=function(_0x5e6fe1,_0x8f80ad){_0x5e6fe1=_0x5e6fe1-0x0;var _0x5a6018=_0x771f[_0x5e6fe1];return _0x5a6018;};'use strict';var _=require('lodash');var util=require(_0xf771('0x0'));var moment=require('moment');var BPromise=require(_0xf771('0x1'));var rs=require(_0xf771('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xf771('0x3'))['db'];var utils=require(_0xf771('0x4'));var logger=require(_0xf771('0x5'))(_0xf771('0x6'));var config=require('../../config/environment');var jayson=require(_0xf771('0x7'));var client=jayson[_0xf771('0x8')][_0xf771('0x9')]({'port':0x232a});config['redis']=_[_0xf771('0xa')](config[_0xf771('0xb')],{'host':'localhost','port':0x18eb});var socket=require(_0xf771('0xc'))(new Redis(config[_0xf771('0xb')]));require(_0xf771('0xd'))[_0xf771('0xe')](socket);function respondWithRpcPromise(_0x524838,_0x3dadb1,_0x2f4156){return new BPromise(function(_0x4c8437,_0x3903e5){return client['request'](_0x524838,_0x2f4156)[_0xf771('0xf')](function(_0x36d4e1){logger[_0xf771('0x10')](_0xf771('0x11'),_0x3dadb1,_0xf771('0x12'));logger[_0xf771('0x13')](_0xf771('0x14'),_0x3dadb1,_0xf771('0x12'),JSON[_0xf771('0x15')](_0x36d4e1));if(_0x36d4e1[_0xf771('0x16')]){if(_0x36d4e1[_0xf771('0x16')][_0xf771('0x17')]===0x1f4){logger['error'](_0xf771('0x11'),_0x3dadb1,_0x36d4e1[_0xf771('0x16')]['message']);return _0x3903e5(_0x36d4e1['error'][_0xf771('0x18')]);}logger[_0xf771('0x16')]('UserNotification,\x20%s,\x20%s',_0x3dadb1,_0x36d4e1['error'][_0xf771('0x18')]);return _0x4c8437(_0x36d4e1[_0xf771('0x16')][_0xf771('0x18')]);}else{logger['info'](_0xf771('0x11'),_0x3dadb1,'request\x20sent');_0x4c8437(_0x36d4e1['result'][_0xf771('0x18')]);}})[_0xf771('0x19')](function(_0x28ef7e){logger[_0xf771('0x16')](_0xf771('0x11'),_0x3dadb1,_0x28ef7e);_0x3903e5(_0x28ef7e);});});}
\ No newline at end of file