Built motion from commit b5b971d.|0.0.97
[motion.git] / server / api / voice_queue / voice_queue.controller.js
index 9c75d9a..92858a7 100644 (file)
@@ -1 +1 @@
-var _0x3b9d=["\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\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x6E\x61\x6D\x65","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x61\x67\x65\x6E\x74","\x69\x64","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x67\x65\x74\x55\x73\x65\x72\x73","\x71\x75\x65\x75\x65\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x62\x6F\x64\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x63\x72\x65\x61\x74\x65","\x50\x52\x49\x4D\x41\x52\x59","\x66\x69\x65\x6C\x64\x73","\x6D\x65\x73\x73\x61\x67\x65","\x4E\x61\x6D\x65\x20\x6D\x75\x73\x74\x20\x62\x65\x20\x75\x6E\x69\x71\x75\x65","\x75\x70\x64\x61\x74\x65","\x6C\x6F\x67","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x53\x49\x50\x2F\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x70\x65\x6E\x61\x6C\x74\x79","\x6D\x61\x70","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x61\x67\x65\x6E\x74\x73","\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"];_0x3b9d[0];var _=require(_0x3b9d[1]);var util=require(_0x3b9d[2]);var Util=require(_0x3b9d[3]);var sequelize=require(_0x3b9d[5])[_0x3b9d[4]];var User=require(_0x3b9d[5])[_0x3b9d[6]];var VoiceQueue=require(_0x3b9d[5])[_0x3b9d[7]];var UserHasVoiceQueue=require(_0x3b9d[5])[_0x3b9d[8]];var VoiceExtension=require(_0x3b9d[5])[_0x3b9d[9]];exports[_0x3b9d[10]]=function(_0xf020x9,_0xf020xa){return VoiceQueue[_0x3b9d[17]](Util[_0x3b9d[16]](_0xf020x9[_0x3b9d[15]]))[_0x3b9d[14]](function(_0xf020xc){_0xf020xa[_0x3b9d[13]](200)[_0x3b9d[12]](_0xf020xc)})[_0x3b9d[11]](function(_0xf020xb){return handleError(_0xf020xa,_0xf020xb)})};exports[_0x3b9d[18]]=function(_0xf020x9,_0xf020xa){return VoiceQueue[_0x3b9d[22]](_0xf020x9[_0x3b9d[21]][_0x3b9d[20]])[_0x3b9d[14]](function(_0xf020xd){if(!_0xf020xd){return _0xf020xa[_0x3b9d[19]](404)};return _0xf020xa[_0x3b9d[12]](_0xf020xd)})[_0x3b9d[11]](function(_0xf020xb){return handleError(_0xf020xa,_0xf020xb)})};exports[_0x3b9d[23]]=function(_0xf020x9,_0xf020xa){return VoiceQueue[_0x3b9d[22]](_0xf020x9[_0x3b9d[21]][_0x3b9d[20]])[_0x3b9d[14]](function(_0xf020xf){if(!_0xf020xf){return _0xf020xa[_0x3b9d[19]](404)};return _0xf020xf[_0x3b9d[28]]({where:{role:_0x3b9d[24]},attributes:[_0x3b9d[25],_0x3b9d[20],_0x3b9d[26],_0x3b9d[27]]})})[_0x3b9d[14]](function(_0xf020xe){return _0xf020xa[_0x3b9d[13]](200)[_0x3b9d[12]](_0xf020xe)})[_0x3b9d[11]](function(_0xf020xb){return handleError(_0xf020xa,_0xf020xb)})};exports[_0x3b9d[29]]=function(_0xf020x9,_0xf020xa){return VoiceQueue[_0x3b9d[31]]({where:{name:_0xf020x9[_0x3b9d[30]][_0x3b9d[20]]}})[_0x3b9d[14]](function(_0xf020xd){if(!_0xf020xd){return _0xf020xa[_0x3b9d[19]](404)};return _0xf020xa[_0x3b9d[12]](_0xf020xd)})[_0x3b9d[11]](function(_0xf020xb){return handleError(_0xf020xa,_0xf020xb)})};exports[_0x3b9d[32]]=function(_0xf020x9,_0xf020xa){return VoiceQueue[_0x3b9d[32]](_0xf020x9[_0x3b9d[30]])[_0x3b9d[14]](function(_0xf020xd){return _0xf020xa[_0x3b9d[13]](201)[_0x3b9d[12]](_0xf020xd)})[_0x3b9d[11]](sequelize.UniqueConstraintError,function(_0xf020xb){if(_0xf020xb[_0x3b9d[34]][_0x3b9d[33]]){_0xf020xb[_0x3b9d[35]]=_0x3b9d[36]};return handleError(_0xf020xa,_0xf020xb)})[_0x3b9d[11]](function(_0xf020xb){return handleError(_0xf020xa,_0xf020xb)})};exports[_0x3b9d[37]]=function(_0xf020x9,_0xf020xa){if(_0xf020x9[_0x3b9d[30]][_0x3b9d[20]]){delete _0xf020x9[_0x3b9d[30]][_0x3b9d[20]]};return VoiceQueue[_0x3b9d[22]](_0xf020x9[_0x3b9d[21]][_0x3b9d[20]])[_0x3b9d[14]](function(_0xf020xd){if(!_0xf020xd){return _0xf020xa[_0x3b9d[19]](404)};var _0xf020x10=_[_0x3b9d[39]](_0xf020xd,_0xf020x9[_0x3b9d[30]]);return _0xf020x10[_0x3b9d[40]]()})[_0x3b9d[14]](function(_0xf020xd){return _0xf020xa[_0x3b9d[13]](200)[_0x3b9d[12]](_0xf020xd)})[_0x3b9d[11]](function(_0xf020xb){console[_0x3b9d[38]](_0xf020xb);return handleError(_0xf020xa,_0xf020xb)})};exports[_0x3b9d[41]]=function(_0xf020x9,_0xf020xa,_0xf020x11){return User[_0x3b9d[31]]({where:{id:{$in:_0xf020x9[_0x3b9d[30]][_0x3b9d[47]]}}})[_0x3b9d[14]](function(_0xf020x12){var _0xf020x13=_[_0x3b9d[45]](_0xf020x12,function(_0xf020x14){return {queue:_0xf020x9[_0x3b9d[21]][_0x3b9d[20]],location:util[_0x3b9d[43]](_0x3b9d[42],_0xf020x14[_0x3b9d[20]]),membername:_0xf020x14[_0x3b9d[20]],UserId:_0xf020x14[_0x3b9d[25]],penalty:_0xf020x9[_0x3b9d[30]][_0x3b9d[44]]}});return UserHasVoiceQueue[_0x3b9d[46]](_0xf020x13,{individualHooks:true})})[_0x3b9d[14]](function(){return _0xf020xa[_0x3b9d[19]](200)})[_0x3b9d[11]](function(_0xf020xb){return _0xf020x11(_0xf020xb)})};exports[_0x3b9d[48]]=function(_0xf020x9,_0xf020xa,_0xf020x11){return UserHasVoiceQueue[_0x3b9d[49]]({where:{UserId:_0xf020x9[_0x3b9d[15]][_0x3b9d[47]],queue:_0xf020x9[_0x3b9d[21]][_0x3b9d[20]]},individualHooks:true})[_0x3b9d[14]](function(){return _0xf020xa[_0x3b9d[19]](202)})[_0x3b9d[11]](function(_0xf020xb){return _0xf020x11(_0xf020xb)})};exports[_0x3b9d[49]]=function(_0xf020x9,_0xf020xa){return VoiceQueue[_0x3b9d[49]]({where:{name:_0xf020x9[_0x3b9d[21]][_0x3b9d[20]]},individualHooks:true})[_0x3b9d[14]](function(){return _0xf020xa[_0x3b9d[19]](204)})[_0x3b9d[11]](function(_0xf020xb){return handleError(_0xf020xa,_0xf020xb)})};exports[_0x3b9d[50]]=function(_0xf020x9,_0xf020xa){return VoiceQueue[_0x3b9d[49]]({where:{name:_0xf020x9[_0x3b9d[15]][_0x3b9d[51]]},individualHooks:true})[_0x3b9d[14]](function(){return _0xf020xa[_0x3b9d[19]](204)})[_0x3b9d[11]](function(_0xf020xb){return handleError(_0xf020xa,_0xf020xb)})};function handleError(_0xf020xa,_0xf020xb){return _0xf020xa[_0x3b9d[13]](500)[_0x3b9d[12]](_0xf020xb)}
\ No newline at end of file
+var _0xaf19=["\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","\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","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x6E\x61\x6D\x65","\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","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\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","\x66\x6F\x72\x45\x61\x63\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","\x6C\x6F\x67","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x53\x49\x50\x2F\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x70\x65\x6E\x61\x6C\x74\x79","\x6D\x61\x70","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x61\x67\x65\x6E\x74\x73","\x66\x69\x6E\x64\x41\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"];_0xaf19[0];var _=require(_0xaf19[1]);var util=require(_0xaf19[2]);var Util=require(_0xaf19[3]);var sequelize=require(_0xaf19[5])[_0xaf19[4]];var User=require(_0xaf19[5])[_0xaf19[6]];var VoiceQueue=require(_0xaf19[5])[_0xaf19[7]];var UserHasVoiceQueue=require(_0xaf19[5])[_0xaf19[8]];var VoiceExtension=require(_0xaf19[5])[_0xaf19[9]];exports[_0xaf19[10]]=function(_0x170ex9,_0x170exa){switch(_0x170ex9[_0xaf19[18]][_0xaf19[22]]){case _0xaf19[18]:return User[_0xaf19[19]](_0x170ex9[_0xaf19[18]][_0xaf19[17]],{attributes:[_0xaf19[17]]})[_0xaf19[14]](Util[_0xaf19[16]](_0x170ex9[_0xaf19[15]]))[_0xaf19[14]](function(_0x170exc){_0x170exa[_0xaf19[13]](200)[_0xaf19[12]](_0x170exc)})[_0xaf19[11]](function(_0x170exb){return handleError(_0x170exa,_0x170exb)});default:return VoiceQueue[_0xaf19[21]](Util[_0xaf19[20]](_0x170ex9[_0xaf19[15]]))[_0xaf19[14]](function(_0x170exc){_0x170exa[_0xaf19[13]](200)[_0xaf19[12]](_0x170exc)})[_0xaf19[11]](function(_0x170exb){return handleError(_0x170exa,_0x170exb)})}};exports[_0xaf19[23]]=function(_0x170ex9,_0x170exa){return VoiceQueue[_0xaf19[19]](_0x170ex9[_0xaf19[26]][_0xaf19[25]])[_0xaf19[14]](function(_0x170exd){if(!_0x170exd){return _0x170exa[_0xaf19[24]](404)};return _0x170exa[_0xaf19[12]](_0x170exd)})[_0xaf19[11]](function(_0x170exb){return handleError(_0x170exa,_0x170exb)})};exports[_0xaf19[27]]=function(_0x170ex9,_0x170exa){return VoiceQueue[_0xaf19[19]](_0x170ex9[_0xaf19[26]][_0xaf19[25]])[_0xaf19[14]](function(_0x170exf){if(!_0x170exf){return _0x170exa[_0xaf19[24]](404)};return _0x170exf[_0xaf19[32]]({where:{role:_0xaf19[29]},attributes:[_0xaf19[17],_0xaf19[25],_0xaf19[30],_0xaf19[31]]})})[_0xaf19[14]](function(_0x170exe){return _0x170exa[_0xaf19[13]](200)[_0xaf19[12]]({rows:_0x170exe,count:_0x170exe[_0xaf19[28]]})})[_0xaf19[11]](function(_0x170exb){return handleError(_0x170exa,_0x170exb)})};exports[_0xaf19[33]]=function(_0x170ex9,_0x170exa){return VoiceQueue[_0xaf19[33]](_0x170ex9[_0xaf19[44]])[_0xaf19[14]](function(_0x170exd){return _0x170exa[_0xaf19[13]](201)[_0xaf19[12]](_0x170exd)})[_0xaf19[11]](sequelize.UniqueConstraintError,function(_0x170exb){var _0x170ex10=[];_0x170exb[_0xaf19[38]][_0xaf19[37]](function(_0x170ex11){switch(_0x170ex11[_0xaf19[36]]){case _0xaf19[35]:_0x170ex10[_0xaf19[34]](_0xaf19[25]);break;default:_0x170ex10[_0xaf19[34]](_0x170ex11[_0xaf19[36]])}});_0x170ex10[_0xaf19[34]](_0xaf19[39]);_0x170exb[_0xaf19[40]]=_0x170ex10[_0xaf19[41]]();_0x170exb[_0xaf19[42]]=_0xaf19[43];return _0x170exa[_0xaf19[13]](500)[_0xaf19[12]](_0x170exb)})[_0xaf19[11]](function(_0x170exb){return handleError(_0x170exa,_0x170exb)})};exports[_0xaf19[45]]=function(_0x170ex9,_0x170exa){if(_0x170ex9[_0xaf19[44]][_0xaf19[25]]){delete _0x170ex9[_0xaf19[44]][_0xaf19[25]]};return VoiceQueue[_0xaf19[19]](_0x170ex9[_0xaf19[26]][_0xaf19[25]])[_0xaf19[14]](function(_0x170exd){if(!_0x170exd){return _0x170exa[_0xaf19[24]](404)};var _0x170ex12=_[_0xaf19[47]](_0x170exd,_0x170ex9[_0xaf19[44]]);return _0x170ex12[_0xaf19[48]]()})[_0xaf19[14]](function(_0x170exd){return _0x170exa[_0xaf19[13]](200)[_0xaf19[12]](_0x170exd)})[_0xaf19[11]](function(_0x170exb){console[_0xaf19[46]](_0x170exb);return handleError(_0x170exa,_0x170exb)})};exports[_0xaf19[49]]=function(_0x170ex9,_0x170exa,_0x170ex13){return User[_0xaf19[56]]({where:{id:{$in:_0x170ex9[_0xaf19[44]][_0xaf19[55]]}}})[_0xaf19[14]](function(_0x170ex14){var _0x170ex15=_[_0xaf19[53]](_0x170ex14,function(_0x170ex16){return {queue:_0x170ex9[_0xaf19[26]][_0xaf19[25]],location:util[_0xaf19[51]](_0xaf19[50],_0x170ex16[_0xaf19[25]]),membername:_0x170ex16[_0xaf19[25]],UserId:_0x170ex16[_0xaf19[17]],penalty:_0x170ex9[_0xaf19[44]][_0xaf19[52]]}});return UserHasVoiceQueue[_0xaf19[54]](_0x170ex15,{individualHooks:true})})[_0xaf19[14]](function(){return _0x170exa[_0xaf19[24]](200)})[_0xaf19[11]](function(_0x170exb){console[_0xaf19[46]](_0x170exb);return _0x170ex13(_0x170exb)})};exports[_0xaf19[57]]=function(_0x170ex9,_0x170exa,_0x170ex13){return UserHasVoiceQueue[_0xaf19[58]]({where:{UserId:_0x170ex9[_0xaf19[15]][_0xaf19[55]],queue:_0x170ex9[_0xaf19[26]][_0xaf19[25]]},individualHooks:true})[_0xaf19[14]](function(){return _0x170exa[_0xaf19[24]](202)})[_0xaf19[11]](function(_0x170exb){return _0x170ex13(_0x170exb)})};exports[_0xaf19[58]]=function(_0x170ex9,_0x170exa){return VoiceQueue[_0xaf19[58]]({where:{name:_0x170ex9[_0xaf19[26]][_0xaf19[25]]},individualHooks:true})[_0xaf19[14]](function(){return _0x170exa[_0xaf19[24]](204)})[_0xaf19[11]](function(_0x170exb){return handleError(_0x170exa,_0x170exb)})};exports[_0xaf19[59]]=function(_0x170ex9,_0x170exa){return VoiceQueue[_0xaf19[58]]({where:{name:_0x170ex9[_0xaf19[15]][_0xaf19[60]]},individualHooks:true})[_0xaf19[14]](function(){return _0x170exa[_0xaf19[24]](204)})[_0xaf19[11]](function(_0x170exb){return handleError(_0x170exa,_0x170exb)})};function handleError(_0x170exa,_0x170exb){return _0x170exa[_0xaf19[13]](500)[_0xaf19[12]](_0x170exb)}
\ No newline at end of file