Built motion from commit a9fb64cc6defd8fb3a5cc199221f878e91c0e969. Version 3.0.0...
[motion-next.git] / server / api / voiceQueue / voiceQueue.rpc.js
1 const a756_0x5997=['findOne','info','GetVoiceQueue','then','message','../../rediscache','where','ShowVoiceQueue','options','stringify','catch','register','./voiceQueue.socket','debug','map','rpc','../../config/logger','findAll','attributes','include','raw','model','VoiceQueue'];(function(_0x181fc6,_0x599728){const _0xb6dcd0=function(_0x4ee9a7){while(--_0x4ee9a7){_0x181fc6['push'](_0x181fc6['shift']());}};_0xb6dcd0(++_0x599728);}(a756_0x5997,0x1bb));const a756_0xb6dc=function(_0x181fc6,_0x599728){_0x181fc6=_0x181fc6-0x0;let _0xb6dcd0=a756_0x5997[_0x181fc6];return _0xb6dcd0;};const _0x27efc7=a756_0xb6dc;'use strict';const _=require('lodash'),db=require('../../mysqldb')['db'],logger=require(_0x27efc7('0xa'))(_0x27efc7('0x9')),{getSocket}=require(_0x27efc7('0x16')),socket=getSocket();require(_0x27efc7('0x6'))[_0x27efc7('0x5')](socket),exports[_0x27efc7('0x13')]=function(_0x4ee9a7){const _0x1419d3=this;return new Promise(function(_0xe94b2c,_0x5346d8){const _0x4b5895=a756_0xb6dc;return db[_0x4b5895('0x10')][_0x4b5895('0xb')]({'raw':_0x4ee9a7[_0x4b5895('0x2')]?_0x4ee9a7[_0x4b5895('0x2')][_0x4b5895('0xe')]===undefined?!![]:![]:!![],'where':_0x4ee9a7[_0x4b5895('0x2')]?_0x4ee9a7[_0x4b5895('0x2')][_0x4b5895('0x0')]||null:null,'attributes':_0x4ee9a7[_0x4b5895('0x2')]?_0x4ee9a7[_0x4b5895('0x2')][_0x4b5895('0xc')]||null:null,'limit':_0x4ee9a7['options']?_0x4ee9a7['options']['limit']||null:null,'include':_0x4ee9a7['options']?_0x4ee9a7[_0x4b5895('0x2')][_0x4b5895('0xd')]?_[_0x4b5895('0x8')](_0x4ee9a7[_0x4b5895('0x2')][_0x4b5895('0xd')],function(_0x1fb0aa){const _0x21f871=_0x4b5895;return{'model':db[_0x1fb0aa[_0x21f871('0xf')]],'as':_0x1fb0aa['as'],'attributes':_0x1fb0aa[_0x21f871('0xc')],'include':_0x1fb0aa[_0x21f871('0xd')]?_[_0x21f871('0x8')](_0x1fb0aa['include'],function(_0x2dd0e2){const _0x5bf787=_0x21f871;return{'model':db[_0x2dd0e2['model']],'as':_0x2dd0e2['as'],'attributes':_0x2dd0e2[_0x5bf787('0xc')],'include':_0x2dd0e2[_0x5bf787('0xd')]?_[_0x5bf787('0x8')](_0x2dd0e2[_0x5bf787('0xd')],function(_0xd56627){const _0x4a959f=_0x5bf787;return{'model':db[_0xd56627[_0x4a959f('0xf')]],'as':_0xd56627['as'],'attributes':_0xd56627['attributes']};}):[]};}):[]};}):[]:[]})[_0x4b5895('0x14')](function(_0x4d6321){const _0x1dacee=_0x4b5895;logger[_0x1dacee('0x12')](_0x1dacee('0x13'),_0x4ee9a7),logger[_0x1dacee('0x7')](_0x1dacee('0x13'),_0x4ee9a7,JSON[_0x1dacee('0x3')](_0x4d6321)),_0xe94b2c(_0x4d6321);})[_0x4b5895('0x4')](function(_0x482a99){const _0x3a9c7e=_0x4b5895;logger['error'](_0x3a9c7e('0x13'),_0x482a99[_0x3a9c7e('0x15')],_0x4ee9a7),_0x5346d8(_0x1419d3['error'](0x1f4,_0x482a99['message']));});});},exports['ShowVoiceQueue']=function(_0x5c0d12){const _0x13e024=this;return new Promise(function(_0x2de90e,_0xf95635){const _0x42a40e=a756_0xb6dc;return db[_0x42a40e('0x10')][_0x42a40e('0x11')]({'raw':_0x5c0d12[_0x42a40e('0x2')]?_0x5c0d12[_0x42a40e('0x2')]['raw']===undefined?!![]:![]:!![],'where':_0x5c0d12[_0x42a40e('0x2')]?_0x5c0d12[_0x42a40e('0x2')][_0x42a40e('0x0')]||null:null,'attributes':_0x5c0d12[_0x42a40e('0x2')]?_0x5c0d12[_0x42a40e('0x2')][_0x42a40e('0xc')]||null:null,'include':_0x5c0d12[_0x42a40e('0x2')]?_0x5c0d12[_0x42a40e('0x2')][_0x42a40e('0xd')]?_[_0x42a40e('0x8')](_0x5c0d12[_0x42a40e('0x2')][_0x42a40e('0xd')],function(_0x12f697){const _0x2d301e=_0x42a40e;return{'model':db[_0x12f697[_0x2d301e('0xf')]],'as':_0x12f697['as'],'attributes':_0x12f697[_0x2d301e('0xc')],'include':_0x12f697[_0x2d301e('0xd')]?_[_0x2d301e('0x8')](_0x12f697[_0x2d301e('0xd')],function(_0x53dfdc){const _0x51ca33=_0x2d301e;return{'model':db[_0x53dfdc['model']],'as':_0x53dfdc['as'],'attributes':_0x53dfdc[_0x51ca33('0xc')],'include':_0x53dfdc[_0x51ca33('0xd')]?_[_0x51ca33('0x8')](_0x53dfdc[_0x51ca33('0xd')],function(_0xbefa37){const _0xf6ddd7=_0x51ca33;return{'model':db[_0xbefa37[_0xf6ddd7('0xf')]],'as':_0xbefa37['as'],'attributes':_0xbefa37['attributes']};}):[]};}):[]};}):[]:[]})[_0x42a40e('0x14')](function(_0xb1d335){const _0x5701f9=_0x42a40e;logger[_0x5701f9('0x12')](_0x5701f9('0x1'),_0x5c0d12),logger[_0x5701f9('0x7')](_0x5701f9('0x1'),_0x5c0d12,JSON[_0x5701f9('0x3')](_0xb1d335)),_0x2de90e(_0xb1d335);})[_0x42a40e('0x4')](function(_0x64285e){logger['error']('ShowVoiceQueue',_0x64285e['message'],_0x5c0d12),_0xf95635(_0x13e024['error'](0x1f4,_0x64285e['message']));});});};