Built motion from commit 709aa6fb5ed03aa61bc373fcdbf622215d37d30b. Version 3.0.0...
[motion-next.git] / server / api / mailQueue / mailQueue.rpc.js
index e954c9b..1726e31 100644 (file)
@@ -1 +1 @@
-const a423_0x1a65=['register','catch','GetMailQueue','then','limit','error','rpc','where','MailQueue','message','attributes','include','options','ShowMailQueue','../../mysqldb','map','info','../../rediscache','model','findAll','stringify','debug','../../config/logger'];(function(_0x37b0aa,_0x1a6524){const _0x42c9bc=function(_0x29b6b8){while(--_0x29b6b8){_0x37b0aa['push'](_0x37b0aa['shift']());}};_0x42c9bc(++_0x1a6524);}(a423_0x1a65,0x16d));const a423_0x42c9=function(_0x37b0aa,_0x1a6524){_0x37b0aa=_0x37b0aa-0x0;let _0x42c9bc=a423_0x1a65[_0x37b0aa];return _0x42c9bc;};const _0x53407b=a423_0x42c9;'use strict';const _=require('lodash'),db=require(_0x53407b('0x11'))['db'],logger=require(_0x53407b('0x2'))(_0x53407b('0x9')),{getSocket}=require(_0x53407b('0x14')),socket=getSocket();require('./mailQueue.socket')[_0x53407b('0x3')](socket),exports[_0x53407b('0x5')]=function(_0x29b6b8){const _0x125fcc=this;return new Promise(function(_0x64a764,_0x4c9d2b){const _0xcd54c4=a423_0x42c9;return db[_0xcd54c4('0xb')][_0xcd54c4('0x16')]({'raw':_0x29b6b8[_0xcd54c4('0xf')]?_0x29b6b8['options']['raw']===undefined?!![]:![]:!![],'where':_0x29b6b8['options']?_0x29b6b8[_0xcd54c4('0xf')][_0xcd54c4('0xa')]||null:null,'attributes':_0x29b6b8[_0xcd54c4('0xf')]?_0x29b6b8['options']['attributes']||null:null,'limit':_0x29b6b8['options']?_0x29b6b8[_0xcd54c4('0xf')][_0xcd54c4('0x7')]||null:null,'include':_0x29b6b8['options']?_0x29b6b8['options'][_0xcd54c4('0xe')]?_[_0xcd54c4('0x12')](_0x29b6b8[_0xcd54c4('0xf')][_0xcd54c4('0xe')],function(_0x2dbcdc){const _0x35ad5f=_0xcd54c4;return{'model':db[_0x2dbcdc[_0x35ad5f('0x15')]],'as':_0x2dbcdc['as'],'attributes':_0x2dbcdc[_0x35ad5f('0xd')],'include':_0x2dbcdc['include']?_[_0x35ad5f('0x12')](_0x2dbcdc[_0x35ad5f('0xe')],function(_0x1e9bb1){const _0x407a37=_0x35ad5f;return{'model':db[_0x1e9bb1['model']],'as':_0x1e9bb1['as'],'attributes':_0x1e9bb1[_0x407a37('0xd')],'include':_0x1e9bb1['include']?_[_0x407a37('0x12')](_0x1e9bb1[_0x407a37('0xe')],function(_0x2071fa){const _0x547ffc=_0x407a37;return{'model':db[_0x2071fa[_0x547ffc('0x15')]],'as':_0x2071fa['as'],'attributes':_0x2071fa[_0x547ffc('0xd')]};}):[]};}):[]};}):[]:[]})[_0xcd54c4('0x6')](function(_0x3b5a17){const _0x2b7a2a=_0xcd54c4;logger[_0x2b7a2a('0x13')](_0x2b7a2a('0x5'),_0x29b6b8),logger[_0x2b7a2a('0x1')]('GetMailQueue',_0x29b6b8,JSON[_0x2b7a2a('0x0')](_0x3b5a17)),_0x64a764(_0x3b5a17);})['catch'](function(_0x320374){const _0x460f25=_0xcd54c4;logger['error'](_0x460f25('0x5'),_0x320374[_0x460f25('0xc')],_0x29b6b8),_0x4c9d2b(_0x125fcc[_0x460f25('0x8')](0x1f4,_0x320374[_0x460f25('0xc')]));});});},exports[_0x53407b('0x10')]=function(_0x3660df){const _0x267d1e=this;return new Promise(function(_0x331b23,_0x591181){const _0x1ded8f=a423_0x42c9;return db[_0x1ded8f('0xb')]['findOne']({'raw':_0x3660df['options']?_0x3660df[_0x1ded8f('0xf')]['raw']===undefined?!![]:![]:!![],'where':_0x3660df[_0x1ded8f('0xf')]?_0x3660df[_0x1ded8f('0xf')][_0x1ded8f('0xa')]||null:null,'attributes':_0x3660df[_0x1ded8f('0xf')]?_0x3660df['options'][_0x1ded8f('0xd')]||null:null,'include':_0x3660df['options']?_0x3660df[_0x1ded8f('0xf')][_0x1ded8f('0xe')]?_[_0x1ded8f('0x12')](_0x3660df[_0x1ded8f('0xf')]['include'],function(_0x2073ff){const _0x4ece56=_0x1ded8f;return{'model':db[_0x2073ff[_0x4ece56('0x15')]],'as':_0x2073ff['as'],'attributes':_0x2073ff[_0x4ece56('0xd')],'include':_0x2073ff[_0x4ece56('0xe')]?_[_0x4ece56('0x12')](_0x2073ff[_0x4ece56('0xe')],function(_0x211d76){const _0x5c6137=_0x4ece56;return{'model':db[_0x211d76[_0x5c6137('0x15')]],'as':_0x211d76['as'],'attributes':_0x211d76[_0x5c6137('0xd')],'include':_0x211d76[_0x5c6137('0xe')]?_[_0x5c6137('0x12')](_0x211d76[_0x5c6137('0xe')],function(_0x265923){const _0xbd72da=_0x5c6137;return{'model':db[_0x265923[_0xbd72da('0x15')]],'as':_0x265923['as'],'attributes':_0x265923['attributes']};}):[]};}):[]};}):[]:[]})[_0x1ded8f('0x6')](function(_0x5d1daa){const _0x4c5d1b=_0x1ded8f;logger[_0x4c5d1b('0x13')](_0x4c5d1b('0x10'),_0x3660df),logger['debug'](_0x4c5d1b('0x10'),_0x3660df,JSON['stringify'](_0x5d1daa)),_0x331b23(_0x5d1daa);})[_0x1ded8f('0x4')](function(_0x4b86e4){const _0x220586=_0x1ded8f;logger[_0x220586('0x8')](_0x220586('0x10'),_0x4b86e4[_0x220586('0xc')],_0x3660df),_0x591181(_0x267d1e['error'](0x1f4,_0x4b86e4['message']));});});};
\ No newline at end of file
+const a423_0x2540=['rpc','model','where','register','MailQueue','debug','../../rediscache','stringify','options','raw','include','findAll','findOne','lodash','GetMailQueue','ShowMailQueue','attributes','then','info','error','./mailQueue.socket','map','message'];(function(_0x4bbe7a,_0x25402e){const _0x569f3e=function(_0x4c0d82){while(--_0x4c0d82){_0x4bbe7a['push'](_0x4bbe7a['shift']());}};_0x569f3e(++_0x25402e);}(a423_0x2540,0x19b));const a423_0x569f=function(_0x4bbe7a,_0x25402e){_0x4bbe7a=_0x4bbe7a-0x0;let _0x569f3e=a423_0x2540[_0x4bbe7a];return _0x569f3e;};const _0x2306b6=a423_0x569f;'use strict';const _=require(_0x2306b6('0x10')),db=require('../../mysqldb')['db'],logger=require('../../config/logger')(_0x2306b6('0x3')),{getSocket}=require(_0x2306b6('0x9')),socket=getSocket();require(_0x2306b6('0x0'))[_0x2306b6('0x6')](socket),exports['GetMailQueue']=function(_0x4c0d82){const _0x169812=this;return new Promise(function(_0x3859e6,_0x50317){const _0x3546bd=a423_0x569f;return db['MailQueue'][_0x3546bd('0xe')]({'raw':_0x4c0d82[_0x3546bd('0xb')]?_0x4c0d82['options'][_0x3546bd('0xc')]===undefined?!![]:![]:!![],'where':_0x4c0d82[_0x3546bd('0xb')]?_0x4c0d82['options'][_0x3546bd('0x5')]||null:null,'attributes':_0x4c0d82[_0x3546bd('0xb')]?_0x4c0d82[_0x3546bd('0xb')][_0x3546bd('0x13')]||null:null,'limit':_0x4c0d82[_0x3546bd('0xb')]?_0x4c0d82[_0x3546bd('0xb')]['limit']||null:null,'include':_0x4c0d82[_0x3546bd('0xb')]?_0x4c0d82[_0x3546bd('0xb')][_0x3546bd('0xd')]?_[_0x3546bd('0x1')](_0x4c0d82[_0x3546bd('0xb')][_0x3546bd('0xd')],function(_0x17223d){const _0x1e80f7=_0x3546bd;return{'model':db[_0x17223d['model']],'as':_0x17223d['as'],'attributes':_0x17223d['attributes'],'include':_0x17223d['include']?_[_0x1e80f7('0x1')](_0x17223d[_0x1e80f7('0xd')],function(_0x230d1a){const _0x474b26=_0x1e80f7;return{'model':db[_0x230d1a['model']],'as':_0x230d1a['as'],'attributes':_0x230d1a['attributes'],'include':_0x230d1a[_0x474b26('0xd')]?_[_0x474b26('0x1')](_0x230d1a[_0x474b26('0xd')],function(_0x129b81){const _0x323fa4=_0x474b26;return{'model':db[_0x129b81[_0x323fa4('0x4')]],'as':_0x129b81['as'],'attributes':_0x129b81[_0x323fa4('0x13')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x4c116a){const _0x32fca3=_0x3546bd;logger['info']('GetMailQueue',_0x4c0d82),logger[_0x32fca3('0x8')](_0x32fca3('0x11'),_0x4c0d82,JSON[_0x32fca3('0xa')](_0x4c116a)),_0x3859e6(_0x4c116a);})['catch'](function(_0x58a951){const _0x125777=_0x3546bd;logger['error'](_0x125777('0x11'),_0x58a951['message'],_0x4c0d82),_0x50317(_0x169812[_0x125777('0x16')](0x1f4,_0x58a951[_0x125777('0x2')]));});});},exports['ShowMailQueue']=function(_0x4bd917){const _0xe6a473=this;return new Promise(function(_0x560b69,_0x10e7bc){const _0x30a919=a423_0x569f;return db[_0x30a919('0x7')][_0x30a919('0xf')]({'raw':_0x4bd917[_0x30a919('0xb')]?_0x4bd917[_0x30a919('0xb')]['raw']===undefined?!![]:![]:!![],'where':_0x4bd917[_0x30a919('0xb')]?_0x4bd917[_0x30a919('0xb')][_0x30a919('0x5')]||null:null,'attributes':_0x4bd917[_0x30a919('0xb')]?_0x4bd917[_0x30a919('0xb')]['attributes']||null:null,'include':_0x4bd917[_0x30a919('0xb')]?_0x4bd917[_0x30a919('0xb')][_0x30a919('0xd')]?_['map'](_0x4bd917['options'][_0x30a919('0xd')],function(_0x3ee890){const _0x42bf30=_0x30a919;return{'model':db[_0x3ee890[_0x42bf30('0x4')]],'as':_0x3ee890['as'],'attributes':_0x3ee890[_0x42bf30('0x13')],'include':_0x3ee890[_0x42bf30('0xd')]?_[_0x42bf30('0x1')](_0x3ee890[_0x42bf30('0xd')],function(_0x342211){const _0x50ebf0=_0x42bf30;return{'model':db[_0x342211[_0x50ebf0('0x4')]],'as':_0x342211['as'],'attributes':_0x342211['attributes'],'include':_0x342211[_0x50ebf0('0xd')]?_[_0x50ebf0('0x1')](_0x342211[_0x50ebf0('0xd')],function(_0x44da01){const _0x1cd13d=_0x50ebf0;return{'model':db[_0x44da01['model']],'as':_0x44da01['as'],'attributes':_0x44da01[_0x1cd13d('0x13')]};}):[]};}):[]};}):[]:[]})[_0x30a919('0x14')](function(_0x102e55){const _0x116ad1=_0x30a919;logger[_0x116ad1('0x15')]('ShowMailQueue',_0x4bd917),logger[_0x116ad1('0x8')](_0x116ad1('0x12'),_0x4bd917,JSON['stringify'](_0x102e55)),_0x560b69(_0x102e55);})['catch'](function(_0x2114d7){const _0x2af30b=_0x30a919;logger[_0x2af30b('0x16')]('ShowMailQueue',_0x2114d7[_0x2af30b('0x2')],_0x4bd917),_0x10e7bc(_0xe6a473['error'](0x1f4,_0x2114d7[_0x2af30b('0x2')]));});});};
\ No newline at end of file