Built motion from commit b322525.|0.0.112
[motion.git] / server / api / voice_queue / voice_queue.controller.js
index c264f79..a1d83e4 100644 (file)
@@ -1 +1 @@
-var _0xd6b3=["\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","\x6C\x65\x6E\x67\x74\x68","\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","\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"];_0xd6b3[0];var _=require(_0xd6b3[1]);var util=require(_0xd6b3[2]);var Util=require(_0xd6b3[3]);var sequelize=require(_0xd6b3[5])[_0xd6b3[4]];var User=require(_0xd6b3[5])[_0xd6b3[6]];var VoiceQueue=require(_0xd6b3[5])[_0xd6b3[7]];var UserHasVoiceQueue=require(_0xd6b3[5])[_0xd6b3[8]];var VoiceExtension=require(_0xd6b3[5])[_0xd6b3[9]];exports[_0xd6b3[10]]=function(_0x943ax9,_0x943axa){return VoiceQueue[_0xd6b3[17]](Util[_0xd6b3[16]](_0x943ax9[_0xd6b3[15]]))[_0xd6b3[14]](function(_0x943axc){_0x943axa[_0xd6b3[13]](200)[_0xd6b3[12]](_0x943axc)})[_0xd6b3[11]](function(_0x943axb){return handleError(_0x943axa,_0x943axb)})};exports[_0xd6b3[18]]=function(_0x943ax9,_0x943axa){return VoiceQueue[_0xd6b3[22]](_0x943ax9[_0xd6b3[21]][_0xd6b3[20]])[_0xd6b3[14]](function(_0x943axd){if(!_0x943axd){return _0x943axa[_0xd6b3[19]](404)};return _0x943axa[_0xd6b3[12]](_0x943axd)})[_0xd6b3[11]](function(_0x943axb){return handleError(_0x943axa,_0x943axb)})};exports[_0xd6b3[23]]=function(_0x943ax9,_0x943axa){return VoiceQueue[_0xd6b3[22]](_0x943ax9[_0xd6b3[21]][_0xd6b3[20]])[_0xd6b3[14]](function(_0x943axf){if(!_0x943axf){return _0x943axa[_0xd6b3[19]](404)};return _0x943axf[_0xd6b3[29]]({where:{role:_0xd6b3[25]},attributes:[_0xd6b3[26],_0xd6b3[20],_0xd6b3[27],_0xd6b3[28]]})})[_0xd6b3[14]](function(_0x943axe){return _0x943axa[_0xd6b3[13]](200)[_0xd6b3[12]]({rows:_0x943axe,count:_0x943axe[_0xd6b3[24]]})})[_0xd6b3[11]](function(_0x943axb){return handleError(_0x943axa,_0x943axb)})};exports[_0xd6b3[30]]=function(_0x943ax9,_0x943axa){return VoiceQueue[_0xd6b3[30]](_0x943ax9[_0xd6b3[41]])[_0xd6b3[14]](function(_0x943axd){return _0x943axa[_0xd6b3[13]](201)[_0xd6b3[12]](_0x943axd)})[_0xd6b3[11]](sequelize.UniqueConstraintError,function(_0x943axb){var _0x943ax10=[];_0x943axb[_0xd6b3[35]][_0xd6b3[34]](function(_0x943ax11){switch(_0x943ax11[_0xd6b3[33]]){case _0xd6b3[32]:_0x943ax10[_0xd6b3[31]](_0xd6b3[20]);break;default:_0x943ax10[_0xd6b3[31]](_0x943ax11[_0xd6b3[33]])}});_0x943ax10[_0xd6b3[31]](_0xd6b3[36]);_0x943axb[_0xd6b3[37]]=_0x943ax10[_0xd6b3[38]]();_0x943axb[_0xd6b3[39]]=_0xd6b3[40];return _0x943axa[_0xd6b3[13]](500)[_0xd6b3[12]](_0x943axb)})[_0xd6b3[11]](function(_0x943axb){return handleError(_0x943axa,_0x943axb)})};exports[_0xd6b3[42]]=function(_0x943ax9,_0x943axa){if(_0x943ax9[_0xd6b3[41]][_0xd6b3[20]]){delete _0x943ax9[_0xd6b3[41]][_0xd6b3[20]]};return VoiceQueue[_0xd6b3[22]](_0x943ax9[_0xd6b3[21]][_0xd6b3[20]])[_0xd6b3[14]](function(_0x943axd){if(!_0x943axd){return _0x943axa[_0xd6b3[19]](404)};var _0x943ax12=_[_0xd6b3[44]](_0x943axd,_0x943ax9[_0xd6b3[41]]);return _0x943ax12[_0xd6b3[45]]()})[_0xd6b3[14]](function(_0x943axd){return _0x943axa[_0xd6b3[13]](200)[_0xd6b3[12]](_0x943axd)})[_0xd6b3[11]](function(_0x943axb){console[_0xd6b3[43]](_0x943axb);return handleError(_0x943axa,_0x943axb)})};exports[_0xd6b3[46]]=function(_0x943ax9,_0x943axa,_0x943ax13){return User[_0xd6b3[53]]({where:{id:{$in:_0x943ax9[_0xd6b3[41]][_0xd6b3[52]]}}})[_0xd6b3[14]](function(_0x943ax14){var _0x943ax15=_[_0xd6b3[50]](_0x943ax14,function(_0x943ax16){return {queue:_0x943ax9[_0xd6b3[21]][_0xd6b3[20]],location:util[_0xd6b3[48]](_0xd6b3[47],_0x943ax16[_0xd6b3[20]]),membername:_0x943ax16[_0xd6b3[20]],UserId:_0x943ax16[_0xd6b3[26]],penalty:_0x943ax9[_0xd6b3[41]][_0xd6b3[49]]}});return UserHasVoiceQueue[_0xd6b3[51]](_0x943ax15,{individualHooks:true})})[_0xd6b3[14]](function(){return _0x943axa[_0xd6b3[19]](200)})[_0xd6b3[11]](function(_0x943axb){console[_0xd6b3[43]](_0x943axb);return _0x943ax13(_0x943axb)})};exports[_0xd6b3[54]]=function(_0x943ax9,_0x943axa,_0x943ax13){return UserHasVoiceQueue[_0xd6b3[55]]({where:{UserId:_0x943ax9[_0xd6b3[15]][_0xd6b3[52]],queue:_0x943ax9[_0xd6b3[21]][_0xd6b3[20]]},individualHooks:true})[_0xd6b3[14]](function(){return _0x943axa[_0xd6b3[19]](202)})[_0xd6b3[11]](function(_0x943axb){return _0x943ax13(_0x943axb)})};exports[_0xd6b3[55]]=function(_0x943ax9,_0x943axa){return VoiceQueue[_0xd6b3[55]]({where:{name:_0x943ax9[_0xd6b3[21]][_0xd6b3[20]]},individualHooks:true})[_0xd6b3[14]](function(){return _0x943axa[_0xd6b3[19]](204)})[_0xd6b3[11]](function(_0x943axb){return handleError(_0x943axa,_0x943axb)})};exports[_0xd6b3[56]]=function(_0x943ax9,_0x943axa){return VoiceQueue[_0xd6b3[55]]({where:{name:_0x943ax9[_0xd6b3[15]][_0xd6b3[57]]},individualHooks:true})[_0xd6b3[14]](function(){return _0x943axa[_0xd6b3[19]](204)})[_0xd6b3[11]](function(_0x943axb){return handleError(_0x943axa,_0x943axb)})};function handleError(_0x943axa,_0x943axb){return _0x943axa[_0xd6b3[13]](500)[_0xd6b3[12]](_0x943axb)}
\ No newline at end of file
+var _0xc30a=["\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"];_0xc30a[0];var _=require(_0xc30a[1]);var util=require(_0xc30a[2]);var Util=require(_0xc30a[3]);var sequelize=require(_0xc30a[5])[_0xc30a[4]];var User=require(_0xc30a[5])[_0xc30a[6]];var VoiceQueue=require(_0xc30a[5])[_0xc30a[7]];var UserHasVoiceQueue=require(_0xc30a[5])[_0xc30a[8]];var VoiceExtension=require(_0xc30a[5])[_0xc30a[9]];exports[_0xc30a[10]]=function(_0x54fbx9,_0x54fbxa){switch(_0x54fbx9[_0xc30a[18]][_0xc30a[22]]){case _0xc30a[18]:return User[_0xc30a[19]](_0x54fbx9[_0xc30a[18]][_0xc30a[17]],{attributes:[_0xc30a[17]]})[_0xc30a[14]](Util[_0xc30a[16]](_0x54fbx9[_0xc30a[15]]))[_0xc30a[14]](function(_0x54fbxc){_0x54fbxa[_0xc30a[13]](200)[_0xc30a[12]](_0x54fbxc)})[_0xc30a[11]](function(_0x54fbxb){return handleError(_0x54fbxa,_0x54fbxb)});default:return VoiceQueue[_0xc30a[21]](Util[_0xc30a[20]](_0x54fbx9[_0xc30a[15]]))[_0xc30a[14]](function(_0x54fbxc){_0x54fbxa[_0xc30a[13]](200)[_0xc30a[12]](_0x54fbxc)})[_0xc30a[11]](function(_0x54fbxb){return handleError(_0x54fbxa,_0x54fbxb)})}};exports[_0xc30a[23]]=function(_0x54fbx9,_0x54fbxa){return VoiceQueue[_0xc30a[19]](_0x54fbx9[_0xc30a[26]][_0xc30a[25]])[_0xc30a[14]](function(_0x54fbxd){if(!_0x54fbxd){return _0x54fbxa[_0xc30a[24]](404)};return _0x54fbxa[_0xc30a[12]](_0x54fbxd)})[_0xc30a[11]](function(_0x54fbxb){return handleError(_0x54fbxa,_0x54fbxb)})};exports[_0xc30a[27]]=function(_0x54fbx9,_0x54fbxa){return VoiceQueue[_0xc30a[19]](_0x54fbx9[_0xc30a[26]][_0xc30a[25]])[_0xc30a[14]](function(_0x54fbxf){if(!_0x54fbxf){return _0x54fbxa[_0xc30a[24]](404)};return _0x54fbxf[_0xc30a[32]]({where:{role:_0xc30a[29]},attributes:[_0xc30a[17],_0xc30a[25],_0xc30a[30],_0xc30a[31]]})})[_0xc30a[14]](function(_0x54fbxe){return _0x54fbxa[_0xc30a[13]](200)[_0xc30a[12]]({rows:_0x54fbxe,count:_0x54fbxe[_0xc30a[28]]})})[_0xc30a[11]](function(_0x54fbxb){return handleError(_0x54fbxa,_0x54fbxb)})};exports[_0xc30a[33]]=function(_0x54fbx9,_0x54fbxa){return VoiceQueue[_0xc30a[33]](_0x54fbx9[_0xc30a[44]])[_0xc30a[14]](function(_0x54fbxd){return _0x54fbxa[_0xc30a[13]](201)[_0xc30a[12]](_0x54fbxd)})[_0xc30a[11]](sequelize.UniqueConstraintError,function(_0x54fbxb){var _0x54fbx10=[];_0x54fbxb[_0xc30a[38]][_0xc30a[37]](function(_0x54fbx11){switch(_0x54fbx11[_0xc30a[36]]){case _0xc30a[35]:_0x54fbx10[_0xc30a[34]](_0xc30a[25]);break;default:_0x54fbx10[_0xc30a[34]](_0x54fbx11[_0xc30a[36]])}});_0x54fbx10[_0xc30a[34]](_0xc30a[39]);_0x54fbxb[_0xc30a[40]]=_0x54fbx10[_0xc30a[41]]();_0x54fbxb[_0xc30a[42]]=_0xc30a[43];return _0x54fbxa[_0xc30a[13]](500)[_0xc30a[12]](_0x54fbxb)})[_0xc30a[11]](function(_0x54fbxb){return handleError(_0x54fbxa,_0x54fbxb)})};exports[_0xc30a[45]]=function(_0x54fbx9,_0x54fbxa){if(_0x54fbx9[_0xc30a[44]][_0xc30a[25]]){delete _0x54fbx9[_0xc30a[44]][_0xc30a[25]]};return VoiceQueue[_0xc30a[19]](_0x54fbx9[_0xc30a[26]][_0xc30a[25]])[_0xc30a[14]](function(_0x54fbxd){if(!_0x54fbxd){return _0x54fbxa[_0xc30a[24]](404)};var _0x54fbx12=_[_0xc30a[47]](_0x54fbxd,_0x54fbx9[_0xc30a[44]]);return _0x54fbx12[_0xc30a[48]]()})[_0xc30a[14]](function(_0x54fbxd){return _0x54fbxa[_0xc30a[13]](200)[_0xc30a[12]](_0x54fbxd)})[_0xc30a[11]](function(_0x54fbxb){console[_0xc30a[46]](_0x54fbxb);return handleError(_0x54fbxa,_0x54fbxb)})};exports[_0xc30a[49]]=function(_0x54fbx9,_0x54fbxa,_0x54fbx13){return User[_0xc30a[56]]({where:{id:{$in:_0x54fbx9[_0xc30a[44]][_0xc30a[55]]}}})[_0xc30a[14]](function(_0x54fbx14){var _0x54fbx15=_[_0xc30a[53]](_0x54fbx14,function(_0x54fbx16){return {queue:_0x54fbx9[_0xc30a[26]][_0xc30a[25]],location:util[_0xc30a[51]](_0xc30a[50],_0x54fbx16[_0xc30a[25]]),membername:_0x54fbx16[_0xc30a[25]],UserId:_0x54fbx16[_0xc30a[17]],penalty:_0x54fbx9[_0xc30a[44]][_0xc30a[52]]}});return UserHasVoiceQueue[_0xc30a[54]](_0x54fbx15,{individualHooks:true})})[_0xc30a[14]](function(){return _0x54fbxa[_0xc30a[24]](200)})[_0xc30a[11]](function(_0x54fbxb){console[_0xc30a[46]](_0x54fbxb);return _0x54fbx13(_0x54fbxb)})};exports[_0xc30a[57]]=function(_0x54fbx9,_0x54fbxa,_0x54fbx13){return UserHasVoiceQueue[_0xc30a[58]]({where:{UserId:_0x54fbx9[_0xc30a[15]][_0xc30a[55]],queue:_0x54fbx9[_0xc30a[26]][_0xc30a[25]]},individualHooks:true})[_0xc30a[14]](function(){return _0x54fbxa[_0xc30a[24]](202)})[_0xc30a[11]](function(_0x54fbxb){return _0x54fbx13(_0x54fbxb)})};exports[_0xc30a[58]]=function(_0x54fbx9,_0x54fbxa){return VoiceQueue[_0xc30a[58]]({where:{name:_0x54fbx9[_0xc30a[26]][_0xc30a[25]]},individualHooks:true})[_0xc30a[14]](function(){return _0x54fbxa[_0xc30a[24]](204)})[_0xc30a[11]](function(_0x54fbxb){return handleError(_0x54fbxa,_0x54fbxb)})};exports[_0xc30a[59]]=function(_0x54fbx9,_0x54fbxa){return VoiceQueue[_0xc30a[58]]({where:{name:_0x54fbx9[_0xc30a[15]][_0xc30a[60]]},individualHooks:true})[_0xc30a[14]](function(){return _0x54fbxa[_0xc30a[24]](204)})[_0xc30a[11]](function(_0x54fbxb){return handleError(_0x54fbxa,_0x54fbxb)})};function handleError(_0x54fbxa,_0x54fbxb){return _0x54fbxa[_0xc30a[13]](500)[_0xc30a[12]](_0x54fbxb)}
\ No newline at end of file