Built motion from commit 709aa6fb5ed03aa61bc373fcdbf622215d37d30b. Version 3.0.0...
[motion-next.git] / server / api / voiceQueue / voiceQueue.rpc.js
index d4a23b9..c08be10 100644 (file)
@@ -1 +1 @@
-const a756_0x525f=['then','catch','ShowVoiceQueue','raw','where','options','../../config/logger','../../rediscache','debug','message','stringify','include','model','attributes','map','findOne','limit','GetVoiceQueue','rpc','../../mysqldb','info','./voiceQueue.socket','error'];(function(_0x4030a1,_0x525f22){const _0x39f50b=function(_0x12b843){while(--_0x12b843){_0x4030a1['push'](_0x4030a1['shift']());}};_0x39f50b(++_0x525f22);}(a756_0x525f,0x1a9));const a756_0x39f5=function(_0x4030a1,_0x525f22){_0x4030a1=_0x4030a1-0x0;let _0x39f50b=a756_0x525f[_0x4030a1];return _0x39f50b;};const _0x16ebff=a756_0x39f5;'use strict';const _=require('lodash'),db=require(_0x16ebff('0x8'))['db'],logger=require(_0x16ebff('0x12'))(_0x16ebff('0x7')),{getSocket}=require(_0x16ebff('0x13')),socket=getSocket();require(_0x16ebff('0xa'))['register'](socket),exports[_0x16ebff('0x6')]=function(_0x12b843){const _0x10fef5=this;return new Promise(function(_0x17f470,_0x5acac4){const _0xedd7ce=a756_0x39f5;return db['VoiceQueue']['findAll']({'raw':_0x12b843[_0xedd7ce('0x11')]?_0x12b843[_0xedd7ce('0x11')][_0xedd7ce('0xf')]===undefined?!![]:![]:!![],'where':_0x12b843[_0xedd7ce('0x11')]?_0x12b843[_0xedd7ce('0x11')][_0xedd7ce('0x10')]||null:null,'attributes':_0x12b843[_0xedd7ce('0x11')]?_0x12b843[_0xedd7ce('0x11')][_0xedd7ce('0x2')]||null:null,'limit':_0x12b843['options']?_0x12b843[_0xedd7ce('0x11')][_0xedd7ce('0x5')]||null:null,'include':_0x12b843[_0xedd7ce('0x11')]?_0x12b843[_0xedd7ce('0x11')]['include']?_[_0xedd7ce('0x3')](_0x12b843[_0xedd7ce('0x11')][_0xedd7ce('0x0')],function(_0x356c60){const _0x2ebed0=_0xedd7ce;return{'model':db[_0x356c60[_0x2ebed0('0x1')]],'as':_0x356c60['as'],'attributes':_0x356c60[_0x2ebed0('0x2')],'include':_0x356c60[_0x2ebed0('0x0')]?_['map'](_0x356c60[_0x2ebed0('0x0')],function(_0x52d454){const _0x3deeca=_0x2ebed0;return{'model':db[_0x52d454['model']],'as':_0x52d454['as'],'attributes':_0x52d454['attributes'],'include':_0x52d454[_0x3deeca('0x0')]?_[_0x3deeca('0x3')](_0x52d454[_0x3deeca('0x0')],function(_0x8b2471){const _0x1766b8=_0x3deeca;return{'model':db[_0x8b2471['model']],'as':_0x8b2471['as'],'attributes':_0x8b2471[_0x1766b8('0x2')]};}):[]};}):[]};}):[]:[]})[_0xedd7ce('0xc')](function(_0x1d435f){const _0x3decbf=_0xedd7ce;logger[_0x3decbf('0x9')](_0x3decbf('0x6'),_0x12b843),logger[_0x3decbf('0x14')](_0x3decbf('0x6'),_0x12b843,JSON[_0x3decbf('0x16')](_0x1d435f)),_0x17f470(_0x1d435f);})[_0xedd7ce('0xd')](function(_0x108780){const _0x28d6b2=_0xedd7ce;logger[_0x28d6b2('0xb')](_0x28d6b2('0x6'),_0x108780[_0x28d6b2('0x15')],_0x12b843),_0x5acac4(_0x10fef5['error'](0x1f4,_0x108780['message']));});});},exports[_0x16ebff('0xe')]=function(_0x3a88b9){const _0x307be5=this;return new Promise(function(_0x55e000,_0x3f8053){const _0x2ddc1a=a756_0x39f5;return db['VoiceQueue'][_0x2ddc1a('0x4')]({'raw':_0x3a88b9[_0x2ddc1a('0x11')]?_0x3a88b9[_0x2ddc1a('0x11')][_0x2ddc1a('0xf')]===undefined?!![]:![]:!![],'where':_0x3a88b9[_0x2ddc1a('0x11')]?_0x3a88b9['options'][_0x2ddc1a('0x10')]||null:null,'attributes':_0x3a88b9[_0x2ddc1a('0x11')]?_0x3a88b9['options'][_0x2ddc1a('0x2')]||null:null,'include':_0x3a88b9[_0x2ddc1a('0x11')]?_0x3a88b9[_0x2ddc1a('0x11')][_0x2ddc1a('0x0')]?_[_0x2ddc1a('0x3')](_0x3a88b9[_0x2ddc1a('0x11')][_0x2ddc1a('0x0')],function(_0x4c1c20){const _0x65cc48=_0x2ddc1a;return{'model':db[_0x4c1c20[_0x65cc48('0x1')]],'as':_0x4c1c20['as'],'attributes':_0x4c1c20[_0x65cc48('0x2')],'include':_0x4c1c20[_0x65cc48('0x0')]?_[_0x65cc48('0x3')](_0x4c1c20[_0x65cc48('0x0')],function(_0x2de2e3){const _0x57662c=_0x65cc48;return{'model':db[_0x2de2e3['model']],'as':_0x2de2e3['as'],'attributes':_0x2de2e3[_0x57662c('0x2')],'include':_0x2de2e3[_0x57662c('0x0')]?_[_0x57662c('0x3')](_0x2de2e3['include'],function(_0x5db0f3){const _0x358a07=_0x57662c;return{'model':db[_0x5db0f3[_0x358a07('0x1')]],'as':_0x5db0f3['as'],'attributes':_0x5db0f3['attributes']};}):[]};}):[]};}):[]:[]})[_0x2ddc1a('0xc')](function(_0x504d76){const _0x11654f=_0x2ddc1a;logger[_0x11654f('0x9')](_0x11654f('0xe'),_0x3a88b9),logger[_0x11654f('0x14')](_0x11654f('0xe'),_0x3a88b9,JSON[_0x11654f('0x16')](_0x504d76)),_0x55e000(_0x504d76);})['catch'](function(_0x34f453){const _0x508bae=_0x2ddc1a;logger[_0x508bae('0xb')](_0x508bae('0xe'),_0x34f453[_0x508bae('0x15')],_0x3a88b9),_0x3f8053(_0x307be5[_0x508bae('0xb')](0x1f4,_0x34f453['message']));});});};
\ No newline at end of file
+const a756_0x57ef=['attributes','info','./voiceQueue.socket','include','raw','rpc','options','ShowVoiceQueue','../../rediscache','register','VoiceQueue','debug','../../config/logger','message','where','../../mysqldb','map','GetVoiceQueue','stringify','findAll','error','model','then','catch','lodash'];(function(_0x6952e0,_0x57efb7){const _0x1c48f1=function(_0x22651c){while(--_0x22651c){_0x6952e0['push'](_0x6952e0['shift']());}};_0x1c48f1(++_0x57efb7);}(a756_0x57ef,0xb2));const a756_0x1c48=function(_0x6952e0,_0x57efb7){_0x6952e0=_0x6952e0-0x0;let _0x1c48f1=a756_0x57ef[_0x6952e0];return _0x1c48f1;};const _0x2d0907=a756_0x1c48;'use strict';const _=require(_0x2d0907('0x15')),db=require(_0x2d0907('0xc'))['db'],logger=require(_0x2d0907('0x9'))(_0x2d0907('0x2')),{getSocket}=require(_0x2d0907('0x5')),socket=getSocket();require(_0x2d0907('0x18'))[_0x2d0907('0x6')](socket),exports[_0x2d0907('0xe')]=function(_0x22651c){const _0x2462cb=this;return new Promise(function(_0x497f99,_0x53d078){const _0x69aaa2=a756_0x1c48;return db[_0x69aaa2('0x7')][_0x69aaa2('0x10')]({'raw':_0x22651c[_0x69aaa2('0x3')]?_0x22651c[_0x69aaa2('0x3')][_0x69aaa2('0x1')]===undefined?!![]:![]:!![],'where':_0x22651c[_0x69aaa2('0x3')]?_0x22651c['options']['where']||null:null,'attributes':_0x22651c[_0x69aaa2('0x3')]?_0x22651c[_0x69aaa2('0x3')][_0x69aaa2('0x16')]||null:null,'limit':_0x22651c[_0x69aaa2('0x3')]?_0x22651c[_0x69aaa2('0x3')]['limit']||null:null,'include':_0x22651c['options']?_0x22651c[_0x69aaa2('0x3')][_0x69aaa2('0x0')]?_[_0x69aaa2('0xd')](_0x22651c['options']['include'],function(_0x336e14){const _0x23bc65=_0x69aaa2;return{'model':db[_0x336e14[_0x23bc65('0x12')]],'as':_0x336e14['as'],'attributes':_0x336e14[_0x23bc65('0x16')],'include':_0x336e14[_0x23bc65('0x0')]?_[_0x23bc65('0xd')](_0x336e14[_0x23bc65('0x0')],function(_0x46eb61){const _0x3461fd=_0x23bc65;return{'model':db[_0x46eb61['model']],'as':_0x46eb61['as'],'attributes':_0x46eb61[_0x3461fd('0x16')],'include':_0x46eb61[_0x3461fd('0x0')]?_[_0x3461fd('0xd')](_0x46eb61[_0x3461fd('0x0')],function(_0x6cddbf){const _0x2b4f8e=_0x3461fd;return{'model':db[_0x6cddbf[_0x2b4f8e('0x12')]],'as':_0x6cddbf['as'],'attributes':_0x6cddbf['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x5202b0){const _0xf08ee5=_0x69aaa2;logger['info']('GetVoiceQueue',_0x22651c),logger['debug'](_0xf08ee5('0xe'),_0x22651c,JSON['stringify'](_0x5202b0)),_0x497f99(_0x5202b0);})['catch'](function(_0x20c911){const _0x49df39=_0x69aaa2;logger[_0x49df39('0x11')](_0x49df39('0xe'),_0x20c911[_0x49df39('0xa')],_0x22651c),_0x53d078(_0x2462cb[_0x49df39('0x11')](0x1f4,_0x20c911['message']));});});},exports[_0x2d0907('0x4')]=function(_0x16d2bb){const _0x62a31a=this;return new Promise(function(_0x1ef0fd,_0x420ea7){const _0x3ce101=a756_0x1c48;return db[_0x3ce101('0x7')]['findOne']({'raw':_0x16d2bb['options']?_0x16d2bb['options'][_0x3ce101('0x1')]===undefined?!![]:![]:!![],'where':_0x16d2bb['options']?_0x16d2bb[_0x3ce101('0x3')][_0x3ce101('0xb')]||null:null,'attributes':_0x16d2bb[_0x3ce101('0x3')]?_0x16d2bb[_0x3ce101('0x3')]['attributes']||null:null,'include':_0x16d2bb['options']?_0x16d2bb[_0x3ce101('0x3')]['include']?_[_0x3ce101('0xd')](_0x16d2bb['options'][_0x3ce101('0x0')],function(_0x36b22e){const _0x165df1=_0x3ce101;return{'model':db[_0x36b22e[_0x165df1('0x12')]],'as':_0x36b22e['as'],'attributes':_0x36b22e[_0x165df1('0x16')],'include':_0x36b22e['include']?_[_0x165df1('0xd')](_0x36b22e[_0x165df1('0x0')],function(_0x2ba7f7){const _0x405ad0=_0x165df1;return{'model':db[_0x2ba7f7['model']],'as':_0x2ba7f7['as'],'attributes':_0x2ba7f7[_0x405ad0('0x16')],'include':_0x2ba7f7['include']?_['map'](_0x2ba7f7[_0x405ad0('0x0')],function(_0x2233e0){const _0x2a25c9=_0x405ad0;return{'model':db[_0x2233e0[_0x2a25c9('0x12')]],'as':_0x2233e0['as'],'attributes':_0x2233e0[_0x2a25c9('0x16')]};}):[]};}):[]};}):[]:[]})[_0x3ce101('0x13')](function(_0x4c2532){const _0x50f2bb=_0x3ce101;logger[_0x50f2bb('0x17')](_0x50f2bb('0x4'),_0x16d2bb),logger[_0x50f2bb('0x8')](_0x50f2bb('0x4'),_0x16d2bb,JSON[_0x50f2bb('0xf')](_0x4c2532)),_0x1ef0fd(_0x4c2532);})[_0x3ce101('0x14')](function(_0x499924){const _0x8b62d0=_0x3ce101;logger[_0x8b62d0('0x11')](_0x8b62d0('0x4'),_0x499924[_0x8b62d0('0xa')],_0x16d2bb),_0x420ea7(_0x62a31a['error'](0x1f4,_0x499924[_0x8b62d0('0xa')]));});});};
\ No newline at end of file