Built motion from commit 4a18b36e645f5fa4a517d36f9783bde259878164. Version 3.0.0...
[motion-next.git] / server / api / voiceQueue / voiceQueue.rpc.js
1 const a756_0x1b5c=['map','attributes','info','lodash','../../mysqldb','../../rediscache','then','findAll','options','include','catch','stringify','error','GetVoiceQueue','raw','VoiceQueue','debug','ShowVoiceQueue','where','model','register','rpc','../../config/logger','message'];(function(_0x52d944,_0x1b5c23){const _0x3182cc=function(_0x2fc917){while(--_0x2fc917){_0x52d944['push'](_0x52d944['shift']());}};_0x3182cc(++_0x1b5c23);}(a756_0x1b5c,0x172));const a756_0x3182=function(_0x52d944,_0x1b5c23){_0x52d944=_0x52d944-0x0;let _0x3182cc=a756_0x1b5c[_0x52d944];return _0x3182cc;};const _0x170581=a756_0x3182;'use strict';const _=require(_0x170581('0x11')),db=require(_0x170581('0x12'))['db'],logger=require(_0x170581('0xc'))(_0x170581('0xb')),{getSocket}=require(_0x170581('0x13')),socket=getSocket();require('./voiceQueue.socket')[_0x170581('0xa')](socket),exports[_0x170581('0x3')]=function(_0x2fc917){const _0x1ef321=this;return new Promise(function(_0x517c68,_0x2f4d05){const _0x4be982=a756_0x3182;return db['VoiceQueue'][_0x4be982('0x15')]({'raw':_0x2fc917[_0x4be982('0x16')]?_0x2fc917[_0x4be982('0x16')]['raw']===undefined?!![]:![]:!![],'where':_0x2fc917[_0x4be982('0x16')]?_0x2fc917[_0x4be982('0x16')][_0x4be982('0x8')]||null:null,'attributes':_0x2fc917['options']?_0x2fc917[_0x4be982('0x16')][_0x4be982('0xf')]||null:null,'limit':_0x2fc917['options']?_0x2fc917[_0x4be982('0x16')]['limit']||null:null,'include':_0x2fc917[_0x4be982('0x16')]?_0x2fc917[_0x4be982('0x16')]['include']?_['map'](_0x2fc917[_0x4be982('0x16')][_0x4be982('0x17')],function(_0x12d67b){const _0x2a5b2f=_0x4be982;return{'model':db[_0x12d67b[_0x2a5b2f('0x9')]],'as':_0x12d67b['as'],'attributes':_0x12d67b[_0x2a5b2f('0xf')],'include':_0x12d67b[_0x2a5b2f('0x17')]?_[_0x2a5b2f('0xe')](_0x12d67b[_0x2a5b2f('0x17')],function(_0x4b12e8){const _0x1b1e31=_0x2a5b2f;return{'model':db[_0x4b12e8[_0x1b1e31('0x9')]],'as':_0x4b12e8['as'],'attributes':_0x4b12e8[_0x1b1e31('0xf')],'include':_0x4b12e8[_0x1b1e31('0x17')]?_['map'](_0x4b12e8['include'],function(_0x13ca5e){const _0x31237c=_0x1b1e31;return{'model':db[_0x13ca5e[_0x31237c('0x9')]],'as':_0x13ca5e['as'],'attributes':_0x13ca5e[_0x31237c('0xf')]};}):[]};}):[]};}):[]:[]})[_0x4be982('0x14')](function(_0x43a67d){const _0x3aaaf4=_0x4be982;logger[_0x3aaaf4('0x10')]('GetVoiceQueue',_0x2fc917),logger[_0x3aaaf4('0x6')]('GetVoiceQueue',_0x2fc917,JSON[_0x3aaaf4('0x1')](_0x43a67d)),_0x517c68(_0x43a67d);})[_0x4be982('0x0')](function(_0x3cb5e6){const _0x34cb41=_0x4be982;logger['error']('GetVoiceQueue',_0x3cb5e6['message'],_0x2fc917),_0x2f4d05(_0x1ef321[_0x34cb41('0x2')](0x1f4,_0x3cb5e6[_0x34cb41('0xd')]));});});},exports[_0x170581('0x7')]=function(_0x285d3d){const _0x3e458e=this;return new Promise(function(_0x53490c,_0x208088){const _0x36383e=a756_0x3182;return db[_0x36383e('0x5')]['findOne']({'raw':_0x285d3d[_0x36383e('0x16')]?_0x285d3d['options'][_0x36383e('0x4')]===undefined?!![]:![]:!![],'where':_0x285d3d[_0x36383e('0x16')]?_0x285d3d[_0x36383e('0x16')][_0x36383e('0x8')]||null:null,'attributes':_0x285d3d[_0x36383e('0x16')]?_0x285d3d[_0x36383e('0x16')]['attributes']||null:null,'include':_0x285d3d[_0x36383e('0x16')]?_0x285d3d[_0x36383e('0x16')][_0x36383e('0x17')]?_[_0x36383e('0xe')](_0x285d3d[_0x36383e('0x16')]['include'],function(_0x39d5c3){const _0x3ed344=_0x36383e;return{'model':db[_0x39d5c3['model']],'as':_0x39d5c3['as'],'attributes':_0x39d5c3[_0x3ed344('0xf')],'include':_0x39d5c3['include']?_['map'](_0x39d5c3[_0x3ed344('0x17')],function(_0x555b08){const _0x1885e0=_0x3ed344;return{'model':db[_0x555b08[_0x1885e0('0x9')]],'as':_0x555b08['as'],'attributes':_0x555b08[_0x1885e0('0xf')],'include':_0x555b08[_0x1885e0('0x17')]?_[_0x1885e0('0xe')](_0x555b08[_0x1885e0('0x17')],function(_0x27fe14){const _0x2b5fdd=_0x1885e0;return{'model':db[_0x27fe14[_0x2b5fdd('0x9')]],'as':_0x27fe14['as'],'attributes':_0x27fe14[_0x2b5fdd('0xf')]};}):[]};}):[]};}):[]:[]})[_0x36383e('0x14')](function(_0x347421){const _0x1478eb=_0x36383e;logger[_0x1478eb('0x10')](_0x1478eb('0x7'),_0x285d3d),logger[_0x1478eb('0x6')](_0x1478eb('0x7'),_0x285d3d,JSON[_0x1478eb('0x1')](_0x347421)),_0x53490c(_0x347421);})[_0x36383e('0x0')](function(_0x15669f){const _0x1883b6=_0x36383e;logger[_0x1883b6('0x2')](_0x1883b6('0x7'),_0x15669f[_0x1883b6('0xd')],_0x285d3d),_0x208088(_0x3e458e['error'](0x1f4,_0x15669f[_0x1883b6('0xd')]));});});};