Built motion from commit e1ea3531f.|1.0.19
[motion.git] / server / api / voice_queue / voice_queue.controller.js
index e3169eb..6891bb9 100644 (file)
@@ -1 +1 @@
-var _0x2e6f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x69\x64","\x75\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x6C\x6F\x67","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x72\x6F\x6C\x65","\x67\x65\x74\x52\x65\x61\x6C\x74\x69\x6D\x65\x51\x75\x65\x75\x65\x73","\x72\x65\x61\x6C\x74\x69\x6D\x65\x51\x75\x65\x75\x65\x4D\x65\x6D\x62\x65\x72\x73","\x61\x6D\x69","\x6C\x6F\x63\x61\x6C\x73","\x61\x70\x70","\x72\x6F\x77\x73","\x6E\x61\x6D\x65","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x6D\x65\x72\x67\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x70\x61\x72\x61\x6D\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x6C\x65\x6E\x67\x74\x68","\x61\x67\x65\x6E\x74","\x67\x65\x74\x55\x73\x65\x72\x73","\x63\x72\x65\x61\x74\x65","\x70\x75\x73\x68","\x50\x52\x49\x4D\x41\x52\x59","\x70\x61\x74\x68","\x65\x72\x72\x6F\x72\x73","\x20\x6D\x75\x73\x74\x20\x62\x65\x20\x75\x6E\x69\x71\x75\x65","\x6D\x65\x73\x73\x61\x67\x65","\x6A\x6F\x69\x6E","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x64\x4D\x65\x73\x73\x61\x67\x65","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x51\x55\x45\x55\x45","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x53\x49\x50\x2F\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x70\x65\x6E\x61\x6C\x74\x79","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x61\x67\x65\x6E\x74\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x61\x6C\x6C","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0x2e6f[0];var _=require(_0x2e6f[1]);var util=require(_0x2e6f[2]);var Util=require(_0x2e6f[3]);var sequelize=require(_0x2e6f[5])[_0x2e6f[4]];var User=require(_0x2e6f[5])[_0x2e6f[6]];var VoiceQueue=require(_0x2e6f[5])[_0x2e6f[7]];var UserHasVoiceQueue=require(_0x2e6f[5])[_0x2e6f[8]];var VoiceExtension=require(_0x2e6f[5])[_0x2e6f[9]];exports[_0x2e6f[10]]= function(_0x3fc9x9,_0x3fc9xa){switch(_0x3fc9x9[_0x2e6f[18]][_0x2e6f[23]]){case _0x2e6f[18]:return User[_0x2e6f[19]](_0x3fc9x9[_0x2e6f[18]][_0x2e6f[17]],{attributes:[_0x2e6f[17]]})[_0x2e6f[14]](Util[_0x2e6f[16]](_0x3fc9x9[_0x2e6f[15]]))[_0x2e6f[14]](function(_0x3fc9xc){_0x3fc9xa[_0x2e6f[13]](200)[_0x2e6f[12]](_0x3fc9xc)})[_0x2e6f[11]](function(_0x3fc9xb){return handleError(_0x3fc9xa,_0x3fc9xb)});default:return VoiceQueue[_0x2e6f[22]](Util[_0x2e6f[21]](_0x3fc9x9[_0x2e6f[15]]))[_0x2e6f[14]](function(_0x3fc9xc){_0x3fc9xa[_0x2e6f[13]](200)[_0x2e6f[12]](_0x3fc9xc)})[_0x2e6f[11]](function(_0x3fc9xb){console[_0x2e6f[20]](_0x3fc9xb);return handleError(_0x3fc9xa,_0x3fc9xb)})}};exports[_0x2e6f[24]]= function(_0x3fc9x9,_0x3fc9xa,_0x3fc9xd){var _0x3fc9xe;switch(_0x3fc9x9[_0x2e6f[18]][_0x2e6f[23]]){case _0x2e6f[18]:var _0x3fc9xf=[];return User[_0x2e6f[19]](_0x3fc9x9[_0x2e6f[18]][_0x2e6f[17]],{attributes:[_0x2e6f[17]]})[_0x2e6f[14]](Util[_0x2e6f[16]]({},{attributes:[_0x2e6f[30]],include:[{raw:true,model:User,attributes:[_0x2e6f[17]]}]}))[_0x2e6f[14]](function(_0x3fc9x10){_0x3fc9xe= _[_0x2e6f[31]](_0x3fc9x10[_0x2e6f[29]],_0x2e6f[30]);_0x3fc9x10[_0x2e6f[29]][_0x2e6f[33]](function(_0x3fc9x11){_0x3fc9xf= _[_0x2e6f[32]](_0x3fc9xf,_[_0x2e6f[31]](_0x3fc9x11.Users,_0x2e6f[17]))});return VoiceQueue[_0x2e6f[22]](_[_0x2e6f[34]](Util[_0x2e6f[21]](_0x3fc9x9[_0x2e6f[15]],{name:_0x3fc9xe}),{include:[{model:User,where:{id:_0x3fc9xf},required:false}]}))})[_0x2e6f[14]](function(_0x3fc9xc){_0x3fc9x9[_0x2e6f[28]][_0x2e6f[27]][_0x2e6f[26]][_0x2e6f[12]]({message:_0x2e6f[25],queues:_0x3fc9xe});return _0x3fc9xa[_0x2e6f[13]](200)[_0x2e6f[12]](_0x3fc9xc)})[_0x2e6f[11]](function(_0x3fc9xb){console[_0x2e6f[20]](_0x3fc9xb);return handleError(_0x3fc9xa,_0x3fc9xb)});default:return VoiceQueue[_0x2e6f[22]](_[_0x2e6f[34]](Util[_0x2e6f[21]](_0x3fc9x9[_0x2e6f[15]]),{include:[{model:User,required:false}]}))[_0x2e6f[14]](function(_0x3fc9xc){_0x3fc9xe= _[_0x2e6f[31]](_0x3fc9xc[_0x2e6f[29]],_0x2e6f[30]);_0x3fc9x9[_0x2e6f[28]][_0x2e6f[27]][_0x2e6f[26]][_0x2e6f[12]]({message:_0x2e6f[25],queues:_0x3fc9xe});return _0x3fc9xa[_0x2e6f[13]](200)[_0x2e6f[12]](_0x3fc9xc)})[_0x2e6f[11]](function(_0x3fc9xb){console[_0x2e6f[20]](_0x3fc9xb);return handleError(_0x3fc9xa,_0x3fc9xb)})}};exports[_0x2e6f[35]]= function(_0x3fc9x9,_0x3fc9xa){return VoiceQueue[_0x2e6f[19]](_0x3fc9x9[_0x2e6f[37]][_0x2e6f[30]])[_0x2e6f[14]](function(_0x3fc9x12){if(!_0x3fc9x12){return _0x3fc9xa[_0x2e6f[36]](404)};return _0x3fc9xa[_0x2e6f[12]](_0x3fc9x12)})[_0x2e6f[11]](function(_0x3fc9xb){return handleError(_0x3fc9xa,_0x3fc9xb)})};exports[_0x2e6f[38]]= function(_0x3fc9x9,_0x3fc9xa){return VoiceQueue[_0x2e6f[19]](_0x3fc9x9[_0x2e6f[37]][_0x2e6f[30]])[_0x2e6f[14]](function(_0x3fc9x11){if(!_0x3fc9x11){return _0x3fc9xa[_0x2e6f[36]](404)};return _0x3fc9x11[_0x2e6f[41]]({where:{role:_0x2e6f[40]}})})[_0x2e6f[14]](function(_0x3fc9xf){return _0x3fc9xa[_0x2e6f[13]](200)[_0x2e6f[12]]({rows:_0x3fc9xf,count:_0x3fc9xf[_0x2e6f[39]]})})[_0x2e6f[11]](function(_0x3fc9xb){return handleError(_0x3fc9xa,_0x3fc9xb)})};exports[_0x2e6f[42]]= function(_0x3fc9x9,_0x3fc9xa){var _0x3fc9x13;return VoiceQueue[_0x2e6f[42]](_0x3fc9x9[_0x2e6f[52]])[_0x2e6f[14]](function(_0x3fc9x12){_0x3fc9x13= _0x3fc9x12})[_0x2e6f[14]](addAgents(_0x3fc9x9,_0x3fc9x9[_0x2e6f[52]][_0x2e6f[30]]))[_0x2e6f[14]](function(){return _0x3fc9xa[_0x2e6f[13]](201)[_0x2e6f[12]](_0x3fc9x13)})[_0x2e6f[11]](sequelize.UniqueConstraintError,function(_0x3fc9xb){var _0x3fc9x14=[];_0x3fc9xb[_0x2e6f[46]][_0x2e6f[33]](function(_0x3fc9x15){switch(_0x3fc9x15[_0x2e6f[45]]){case _0x2e6f[44]:_0x3fc9x14[_0x2e6f[43]](_0x2e6f[30]);break;default:_0x3fc9x14[_0x2e6f[43]](_0x3fc9x15[_0x2e6f[45]])}});_0x3fc9x14[_0x2e6f[43]](_0x2e6f[47]);_0x3fc9xb[_0x2e6f[48]]= _0x3fc9x14[_0x2e6f[49]]();_0x3fc9xb[_0x2e6f[50]]= _0x2e6f[51];return _0x3fc9xa[_0x2e6f[13]](500)[_0x2e6f[12]](_0x3fc9xb)})[_0x2e6f[11]](function(_0x3fc9xb){return handleError(_0x3fc9xa,_0x3fc9xb)})};exports[_0x2e6f[53]]= function(_0x3fc9x9,_0x3fc9xa){if(_0x3fc9x9[_0x2e6f[52]][_0x2e6f[30]]){delete _0x3fc9x9[_0x2e6f[52]][_0x2e6f[30]]};return VoiceQueue[_0x2e6f[19]](_0x3fc9x9[_0x2e6f[37]][_0x2e6f[30]])[_0x2e6f[14]](function(_0x3fc9x12){if(!_0x3fc9x12){return _0x3fc9xa[_0x2e6f[36]](404)};var _0x3fc9x16=_[_0x2e6f[34]](_0x3fc9x12,_0x3fc9x9[_0x2e6f[52]]);return _0x3fc9x16[_0x2e6f[54]]()})[_0x2e6f[14]](function(_0x3fc9x12){return _0x3fc9xa[_0x2e6f[13]](200)[_0x2e6f[12]](_0x3fc9x12)})[_0x2e6f[11]](function(_0x3fc9xb){console[_0x2e6f[20]](_0x3fc9xb);return handleError(_0x3fc9xa,_0x3fc9xb)})};function addAgents(_0x3fc9x9,_0x3fc9x11){return function(){return User[_0x2e6f[60]]({where:{id:_0x3fc9x9[_0x2e6f[52]][_0x2e6f[59]]},raw:true})[_0x2e6f[14]](function(_0x3fc9x18){var _0x3fc9x19=_[_0x2e6f[31]](_0x3fc9x18,function(_0x3fc9x1a){return {queue:_0x3fc9x11,interface:util[_0x2e6f[56]](_0x2e6f[55],_0x3fc9x1a[_0x2e6f[30]]),stateinterface:util[_0x2e6f[56]](_0x2e6f[55],_0x3fc9x1a[_0x2e6f[30]]),membername:_0x3fc9x1a[_0x2e6f[30]],UserId:_0x3fc9x1a[_0x2e6f[17]],penalty:_0x3fc9x9[_0x2e6f[52]][_0x2e6f[57]]}});return UserHasVoiceQueue[_0x2e6f[58]](_0x3fc9x19,{individualHooks:true})})}}exports[_0x2e6f[61]]= function(_0x3fc9x9,_0x3fc9xa,_0x3fc9xd){return Promise[_0x2e6f[62]]([])[_0x2e6f[14]](addAgents(_0x3fc9x9,_0x3fc9x9[_0x2e6f[37]][_0x2e6f[30]]))[_0x2e6f[14]](function(){return _0x3fc9xa[_0x2e6f[36]](200)})[_0x2e6f[11]](function(_0x3fc9xb){console[_0x2e6f[20]](_0x3fc9xb);return _0x3fc9xd(_0x3fc9xb)})};exports[_0x2e6f[63]]= function(_0x3fc9x9,_0x3fc9xa,_0x3fc9xd){return UserHasVoiceQueue[_0x2e6f[64]]({where:{UserId:_0x3fc9x9[_0x2e6f[15]][_0x2e6f[59]],queue:_0x3fc9x9[_0x2e6f[37]][_0x2e6f[30]]},individualHooks:true})[_0x2e6f[14]](function(){return _0x3fc9xa[_0x2e6f[36]](202)})[_0x2e6f[11]](function(_0x3fc9xb){return _0x3fc9xd(_0x3fc9xb)})};exports[_0x2e6f[64]]= function(_0x3fc9x9,_0x3fc9xa){return VoiceQueue[_0x2e6f[64]]({where:{name:_0x3fc9x9[_0x2e6f[37]][_0x2e6f[30]]},individualHooks:true})[_0x2e6f[14]](function(){return _0x3fc9xa[_0x2e6f[36]](204)})[_0x2e6f[11]](function(_0x3fc9xb){return handleError(_0x3fc9xa,_0x3fc9xb)})};exports[_0x2e6f[65]]= function(_0x3fc9x9,_0x3fc9xa){return VoiceQueue[_0x2e6f[64]]({where:{name:_0x3fc9x9[_0x2e6f[15]][_0x2e6f[66]]},individualHooks:true})[_0x2e6f[14]](function(){return _0x3fc9xa[_0x2e6f[36]](204)})[_0x2e6f[11]](function(_0x3fc9xb){return handleError(_0x3fc9xa,_0x3fc9xb)})};function handleError(_0x3fc9xa,_0x3fc9xb){return _0x3fc9xa[_0x2e6f[13]](500)[_0x2e6f[12]](_0x3fc9xb)}
\ No newline at end of file
+var _0xa322=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x69\x64","\x75\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x72\x6F\x6C\x65","\x67\x65\x74\x52\x65\x61\x6C\x74\x69\x6D\x65\x51\x75\x65\x75\x65\x73","\x72\x65\x61\x6C\x74\x69\x6D\x65\x51\x75\x65\x75\x65\x4D\x65\x6D\x62\x65\x72\x73","\x61\x6D\x69","\x6C\x6F\x63\x61\x6C\x73","\x61\x70\x70","\x72\x6F\x77\x73","\x6E\x61\x6D\x65","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x6D\x65\x72\x67\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x70\x61\x72\x61\x6D\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x6C\x65\x6E\x67\x74\x68","\x61\x67\x65\x6E\x74","\x67\x65\x74\x55\x73\x65\x72\x73","\x63\x72\x65\x61\x74\x65","\x70\x75\x73\x68","\x50\x52\x49\x4D\x41\x52\x59","\x70\x61\x74\x68","\x65\x72\x72\x6F\x72\x73","\x20\x6D\x75\x73\x74\x20\x62\x65\x20\x75\x6E\x69\x71\x75\x65","\x6D\x65\x73\x73\x61\x67\x65","\x6A\x6F\x69\x6E","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x64\x4D\x65\x73\x73\x61\x67\x65","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x51\x55\x45\x55\x45","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x53\x49\x50\x2F\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x70\x65\x6E\x61\x6C\x74\x79","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x61\x67\x65\x6E\x74\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x61\x6C\x6C","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72"];_0xa322[0];var _=require(_0xa322[1]);var logger=require(_0xa322[3])(_0xa322[2]);var util=require(_0xa322[4]);var Util=require(_0xa322[5]);var sequelize=require(_0xa322[7])[_0xa322[6]];var User=require(_0xa322[7])[_0xa322[8]];var VoiceQueue=require(_0xa322[7])[_0xa322[9]];var UserHasVoiceQueue=require(_0xa322[7])[_0xa322[10]];var VoiceExtension=require(_0xa322[7])[_0xa322[11]];exports[_0xa322[12]]= function(_0x28fcxa,_0x28fcxb){switch(_0x28fcxa[_0xa322[20]][_0xa322[24]]){case _0xa322[20]:return User[_0xa322[21]](_0x28fcxa[_0xa322[20]][_0xa322[19]],{attributes:[_0xa322[19]]})[_0xa322[16]](Util[_0xa322[18]](_0x28fcxa[_0xa322[17]]))[_0xa322[16]](function(_0x28fcxd){_0x28fcxb[_0xa322[15]](200)[_0xa322[14]](_0x28fcxd)})[_0xa322[13]](function(_0x28fcxc){return handleError(_0x28fcxb,_0x28fcxc)});default:return VoiceQueue[_0xa322[23]](Util[_0xa322[22]](_0x28fcxa[_0xa322[17]]))[_0xa322[16]](function(_0x28fcxd){_0x28fcxb[_0xa322[15]](200)[_0xa322[14]](_0x28fcxd)})[_0xa322[13]](function(_0x28fcxc){return handleError(_0x28fcxb,_0x28fcxc)})}};exports[_0xa322[25]]= function(_0x28fcxa,_0x28fcxb,_0x28fcxe){var _0x28fcxf;switch(_0x28fcxa[_0xa322[20]][_0xa322[24]]){case _0xa322[20]:var _0x28fcx10=[];return User[_0xa322[21]](_0x28fcxa[_0xa322[20]][_0xa322[19]],{attributes:[_0xa322[19]]})[_0xa322[16]](Util[_0xa322[18]]({},{attributes:[_0xa322[31]],include:[{raw:true,model:User,attributes:[_0xa322[19]]}]}))[_0xa322[16]](function(_0x28fcx11){_0x28fcxf= _[_0xa322[32]](_0x28fcx11[_0xa322[30]],_0xa322[31]);_0x28fcx11[_0xa322[30]][_0xa322[34]](function(_0x28fcx12){_0x28fcx10= _[_0xa322[33]](_0x28fcx10,_[_0xa322[32]](_0x28fcx12.Users,_0xa322[19]))});return VoiceQueue[_0xa322[23]](_[_0xa322[35]](Util[_0xa322[22]](_0x28fcxa[_0xa322[17]],{name:_0x28fcxf}),{include:[{model:User,where:{id:_0x28fcx10},required:false}]}))})[_0xa322[16]](function(_0x28fcxd){_0x28fcxa[_0xa322[29]][_0xa322[28]][_0xa322[27]][_0xa322[14]]({message:_0xa322[26],queues:_0x28fcxf});return _0x28fcxb[_0xa322[15]](200)[_0xa322[14]](_0x28fcxd)})[_0xa322[13]](function(_0x28fcxc){return handleError(_0x28fcxb,_0x28fcxc)});default:return VoiceQueue[_0xa322[23]](_[_0xa322[35]](Util[_0xa322[22]](_0x28fcxa[_0xa322[17]]),{include:[{model:User,required:false}]}))[_0xa322[16]](function(_0x28fcxd){_0x28fcxf= _[_0xa322[32]](_0x28fcxd[_0xa322[30]],_0xa322[31]);_0x28fcxa[_0xa322[29]][_0xa322[28]][_0xa322[27]][_0xa322[14]]({message:_0xa322[26],queues:_0x28fcxf});return _0x28fcxb[_0xa322[15]](200)[_0xa322[14]](_0x28fcxd)})[_0xa322[13]](function(_0x28fcxc){return handleError(_0x28fcxb,_0x28fcxc)})}};exports[_0xa322[36]]= function(_0x28fcxa,_0x28fcxb){return VoiceQueue[_0xa322[21]](_0x28fcxa[_0xa322[38]][_0xa322[31]])[_0xa322[16]](function(_0x28fcx13){if(!_0x28fcx13){return _0x28fcxb[_0xa322[37]](404)};return _0x28fcxb[_0xa322[14]](_0x28fcx13)})[_0xa322[13]](function(_0x28fcxc){return handleError(_0x28fcxb,_0x28fcxc)})};exports[_0xa322[39]]= function(_0x28fcxa,_0x28fcxb){return VoiceQueue[_0xa322[21]](_0x28fcxa[_0xa322[38]][_0xa322[31]])[_0xa322[16]](function(_0x28fcx12){if(!_0x28fcx12){return _0x28fcxb[_0xa322[37]](404)};return _0x28fcx12[_0xa322[42]]({where:{role:_0xa322[41]}})})[_0xa322[16]](function(_0x28fcx10){return _0x28fcxb[_0xa322[15]](200)[_0xa322[14]]({rows:_0x28fcx10,count:_0x28fcx10[_0xa322[40]]})})[_0xa322[13]](function(_0x28fcxc){return handleError(_0x28fcxb,_0x28fcxc)})};exports[_0xa322[43]]= function(_0x28fcxa,_0x28fcxb){var _0x28fcx14;return VoiceQueue[_0xa322[43]](_0x28fcxa[_0xa322[53]])[_0xa322[16]](function(_0x28fcx13){_0x28fcx14= _0x28fcx13})[_0xa322[16]](addAgents(_0x28fcxa,_0x28fcxa[_0xa322[53]][_0xa322[31]]))[_0xa322[16]](function(){return _0x28fcxb[_0xa322[15]](201)[_0xa322[14]](_0x28fcx14)})[_0xa322[13]](sequelize.UniqueConstraintError,function(_0x28fcxc){var _0x28fcx15=[];_0x28fcxc[_0xa322[47]][_0xa322[34]](function(_0x28fcx16){switch(_0x28fcx16[_0xa322[46]]){case _0xa322[45]:_0x28fcx15[_0xa322[44]](_0xa322[31]);break;default:_0x28fcx15[_0xa322[44]](_0x28fcx16[_0xa322[46]])}});_0x28fcx15[_0xa322[44]](_0xa322[48]);_0x28fcxc[_0xa322[49]]= _0x28fcx15[_0xa322[50]]();_0x28fcxc[_0xa322[51]]= _0xa322[52];return _0x28fcxb[_0xa322[15]](500)[_0xa322[14]](_0x28fcxc)})[_0xa322[13]](function(_0x28fcxc){return handleError(_0x28fcxb,_0x28fcxc)})};exports[_0xa322[54]]= function(_0x28fcxa,_0x28fcxb){if(_0x28fcxa[_0xa322[53]][_0xa322[31]]){delete _0x28fcxa[_0xa322[53]][_0xa322[31]]};return VoiceQueue[_0xa322[21]](_0x28fcxa[_0xa322[38]][_0xa322[31]])[_0xa322[16]](function(_0x28fcx13){if(!_0x28fcx13){return _0x28fcxb[_0xa322[37]](404)};var _0x28fcx17=_[_0xa322[35]](_0x28fcx13,_0x28fcxa[_0xa322[53]]);return _0x28fcx17[_0xa322[55]]()})[_0xa322[16]](function(_0x28fcx13){return _0x28fcxb[_0xa322[15]](200)[_0xa322[14]](_0x28fcx13)})[_0xa322[13]](function(_0x28fcxc){return handleError(_0x28fcxb,_0x28fcxc)})};function addAgents(_0x28fcxa,_0x28fcx12){return function(){return User[_0xa322[61]]({where:{id:_0x28fcxa[_0xa322[53]][_0xa322[60]]},raw:true})[_0xa322[16]](function(_0x28fcx19){var _0x28fcx1a=_[_0xa322[32]](_0x28fcx19,function(_0x28fcx1b){return {queue:_0x28fcx12,interface:util[_0xa322[57]](_0xa322[56],_0x28fcx1b[_0xa322[31]]),stateinterface:util[_0xa322[57]](_0xa322[56],_0x28fcx1b[_0xa322[31]]),membername:_0x28fcx1b[_0xa322[31]],UserId:_0x28fcx1b[_0xa322[19]],penalty:_0x28fcxa[_0xa322[53]][_0xa322[58]]}});return UserHasVoiceQueue[_0xa322[59]](_0x28fcx1a,{individualHooks:true})})}}exports[_0xa322[62]]= function(_0x28fcxa,_0x28fcxb,_0x28fcxe){return Promise[_0xa322[63]]([])[_0xa322[16]](addAgents(_0x28fcxa,_0x28fcxa[_0xa322[38]][_0xa322[31]]))[_0xa322[16]](function(){return _0x28fcxb[_0xa322[37]](200)})[_0xa322[13]](function(_0x28fcxc){return handleError(_0x28fcxb,_0x28fcxc)})};exports[_0xa322[64]]= function(_0x28fcxa,_0x28fcxb,_0x28fcxe){return UserHasVoiceQueue[_0xa322[65]]({where:{UserId:_0x28fcxa[_0xa322[17]][_0xa322[60]],queue:_0x28fcxa[_0xa322[38]][_0xa322[31]]},individualHooks:true})[_0xa322[16]](function(){return _0x28fcxb[_0xa322[37]](202)})[_0xa322[13]](function(_0x28fcxc){return _0x28fcxe(_0x28fcxc)})};exports[_0xa322[65]]= function(_0x28fcxa,_0x28fcxb){return VoiceQueue[_0xa322[65]]({where:{name:_0x28fcxa[_0xa322[38]][_0xa322[31]]},individualHooks:true})[_0xa322[16]](function(){return _0x28fcxb[_0xa322[37]](204)})[_0xa322[13]](function(_0x28fcxc){return handleError(_0x28fcxb,_0x28fcxc)})};exports[_0xa322[66]]= function(_0x28fcxa,_0x28fcxb){return VoiceQueue[_0xa322[65]]({where:{name:_0x28fcxa[_0xa322[17]][_0xa322[67]]},individualHooks:true})[_0xa322[16]](function(){return _0x28fcxb[_0xa322[37]](204)})[_0xa322[13]](function(_0x28fcxc){return handleError(_0x28fcxb,_0x28fcxc)})};function handleError(_0x28fcxb,_0x28fcxc){logger[_0xa322[69]](_0x28fcxc[_0xa322[68]]);return _0x28fcxb[_0xa322[15]](500)[_0xa322[14]](_0x28fcxc)}
\ No newline at end of file