Built motion from commit bfc7a72f7045b27461c9a5d1f71c1a658cfd0b8b. Version 3.0.0...
[motion-next.git] / server / api / mailQueue / mailQueue.rpc.js
1 const a423_0x3c93=['../../config/logger','options','./mailQueue.socket','where','../../rediscache','include','raw','attributes','ShowMailQueue','rpc','model','debug','MailQueue','then','register','stringify','GetMailQueue','info','../../mysqldb','limit','error','findOne','lodash','map','findAll','message','catch'];(function(_0x280455,_0x3c93b6){const _0x394cea=function(_0x1efc03){while(--_0x1efc03){_0x280455['push'](_0x280455['shift']());}};_0x394cea(++_0x3c93b6);}(a423_0x3c93,0x1d2));const a423_0x394c=function(_0x280455,_0x3c93b6){_0x280455=_0x280455-0x0;let _0x394cea=a423_0x3c93[_0x280455];return _0x394cea;};const _0x9a41d=a423_0x394c;'use strict';const _=require(_0x9a41d('0xf')),db=require(_0x9a41d('0xb'))['db'],logger=require(_0x9a41d('0x14'))(_0x9a41d('0x2')),{getSocket}=require(_0x9a41d('0x18')),socket=getSocket();require(_0x9a41d('0x16'))[_0x9a41d('0x7')](socket),exports['GetMailQueue']=function(_0x1efc03){const _0x406457=this;return new Promise(function(_0x301d6f,_0x2e3d13){const _0x54d57d=a423_0x394c;return db[_0x54d57d('0x5')][_0x54d57d('0x11')]({'raw':_0x1efc03[_0x54d57d('0x15')]?_0x1efc03[_0x54d57d('0x15')]['raw']===undefined?!![]:![]:!![],'where':_0x1efc03['options']?_0x1efc03[_0x54d57d('0x15')][_0x54d57d('0x17')]||null:null,'attributes':_0x1efc03['options']?_0x1efc03[_0x54d57d('0x15')]['attributes']||null:null,'limit':_0x1efc03[_0x54d57d('0x15')]?_0x1efc03[_0x54d57d('0x15')][_0x54d57d('0xc')]||null:null,'include':_0x1efc03[_0x54d57d('0x15')]?_0x1efc03[_0x54d57d('0x15')][_0x54d57d('0x19')]?_['map'](_0x1efc03['options'][_0x54d57d('0x19')],function(_0x1b1fc4){const _0x445830=_0x54d57d;return{'model':db[_0x1b1fc4['model']],'as':_0x1b1fc4['as'],'attributes':_0x1b1fc4[_0x445830('0x0')],'include':_0x1b1fc4[_0x445830('0x19')]?_[_0x445830('0x10')](_0x1b1fc4[_0x445830('0x19')],function(_0x15ddc2){const _0x5155c5=_0x445830;return{'model':db[_0x15ddc2[_0x5155c5('0x3')]],'as':_0x15ddc2['as'],'attributes':_0x15ddc2['attributes'],'include':_0x15ddc2[_0x5155c5('0x19')]?_[_0x5155c5('0x10')](_0x15ddc2[_0x5155c5('0x19')],function(_0x31d547){const _0x29b809=_0x5155c5;return{'model':db[_0x31d547[_0x29b809('0x3')]],'as':_0x31d547['as'],'attributes':_0x31d547[_0x29b809('0x0')]};}):[]};}):[]};}):[]:[]})[_0x54d57d('0x6')](function(_0x55e870){const _0x5a22a7=_0x54d57d;logger[_0x5a22a7('0xa')](_0x5a22a7('0x9'),_0x1efc03),logger[_0x5a22a7('0x4')](_0x5a22a7('0x9'),_0x1efc03,JSON[_0x5a22a7('0x8')](_0x55e870)),_0x301d6f(_0x55e870);})[_0x54d57d('0x13')](function(_0x53ed1c){const _0xcc541f=_0x54d57d;logger[_0xcc541f('0xd')](_0xcc541f('0x9'),_0x53ed1c[_0xcc541f('0x12')],_0x1efc03),_0x2e3d13(_0x406457[_0xcc541f('0xd')](0x1f4,_0x53ed1c[_0xcc541f('0x12')]));});});},exports[_0x9a41d('0x1')]=function(_0x24db7d){const _0x3db2b0=this;return new Promise(function(_0x20fc98,_0x3cf901){const _0x3443e5=a423_0x394c;return db[_0x3443e5('0x5')][_0x3443e5('0xe')]({'raw':_0x24db7d[_0x3443e5('0x15')]?_0x24db7d[_0x3443e5('0x15')][_0x3443e5('0x1a')]===undefined?!![]:![]:!![],'where':_0x24db7d[_0x3443e5('0x15')]?_0x24db7d[_0x3443e5('0x15')][_0x3443e5('0x17')]||null:null,'attributes':_0x24db7d['options']?_0x24db7d[_0x3443e5('0x15')]['attributes']||null:null,'include':_0x24db7d[_0x3443e5('0x15')]?_0x24db7d[_0x3443e5('0x15')][_0x3443e5('0x19')]?_['map'](_0x24db7d['options'][_0x3443e5('0x19')],function(_0x3e1a8e){const _0x4cbacf=_0x3443e5;return{'model':db[_0x3e1a8e[_0x4cbacf('0x3')]],'as':_0x3e1a8e['as'],'attributes':_0x3e1a8e[_0x4cbacf('0x0')],'include':_0x3e1a8e[_0x4cbacf('0x19')]?_['map'](_0x3e1a8e[_0x4cbacf('0x19')],function(_0x235eff){const _0x206ccf=_0x4cbacf;return{'model':db[_0x235eff['model']],'as':_0x235eff['as'],'attributes':_0x235eff[_0x206ccf('0x0')],'include':_0x235eff[_0x206ccf('0x19')]?_[_0x206ccf('0x10')](_0x235eff['include'],function(_0x1a0d29){return{'model':db[_0x1a0d29['model']],'as':_0x1a0d29['as'],'attributes':_0x1a0d29['attributes']};}):[]};}):[]};}):[]:[]})[_0x3443e5('0x6')](function(_0x50ec4a){const _0x27b4d4=_0x3443e5;logger[_0x27b4d4('0xa')](_0x27b4d4('0x1'),_0x24db7d),logger[_0x27b4d4('0x4')](_0x27b4d4('0x1'),_0x24db7d,JSON[_0x27b4d4('0x8')](_0x50ec4a)),_0x20fc98(_0x50ec4a);})[_0x3443e5('0x13')](function(_0x3c8b2f){const _0x11cf05=_0x3443e5;logger[_0x11cf05('0xd')](_0x11cf05('0x1'),_0x3c8b2f['message'],_0x24db7d),_0x3cf901(_0x3db2b0[_0x11cf05('0xd')](0x1f4,_0x3c8b2f[_0x11cf05('0x12')]));});});};