Built motion from commit fc731d1ea.|1.0.23
[motion.git] / server / api / chat_queue / chat_queue.controller.js
index e114684..c7c2b90 100644 (file)
@@ -1 +1 @@
-var _0xa581=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\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","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\x51\x75\x65\x75\x65","\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\x43\x68\x61\x74\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","\x72\x6F\x77\x73","\x6C\x65\x6E\x67\x74\x68","\x67\x65\x74\x51\x75\x65\x72\x79","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x72\x6F\x6C\x65","\x6D\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\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","\x61\x67\x65\x6E\x74","\x6E\x61\x6D\x65","\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","\x61\x67\x65\x6E\x74\x73","\x62\x6F\x64\x79","\x70\x65\x6E\x61\x6C\x74\x79","\x61\x64\x64\x55\x73\x65\x72\x73","\x75\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x6D\x61\x70","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x72\x65\x6D\x6F\x76\x65\x55\x73\x65\x72\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"];_0xa581[0];var _=require(_0xa581[1]);var Util=require(_0xa581[2]);var logger=require(_0xa581[4])(_0xa581[3]);var ChatQueue=require(_0xa581[6])[_0xa581[5]];var User=require(_0xa581[6])[_0xa581[7]];var UserHasChatQueue=require(_0xa581[6])[_0xa581[8]];exports[_0xa581[9]]= function(_0x715fx7,_0x715fx8){switch(_0x715fx7[_0xa581[17]][_0xa581[26]]){case _0xa581[17]:return User[_0xa581[18]](_0x715fx7[_0xa581[17]][_0xa581[16]],{attributes:[_0xa581[16]]})[_0xa581[13]](Util[_0xa581[15]](_0x715fx7[_0xa581[14]]))[_0xa581[13]](function(_0x715fxa){_0x715fx8[_0xa581[12]](200)[_0xa581[11]](_0x715fxa)})[_0xa581[10]](function(_0x715fx9){return handleError(_0x715fx8,_0x715fx9)});default:return ChatQueue[_0xa581[25]](_0xa581[24])[_0xa581[23]](_[_0xa581[22]](Util[_0xa581[21]](_0x715fx7[_0xa581[14]]),{distinct:true}))[_0xa581[13]](function(_0x715fxa){return _0x715fx8[_0xa581[12]](200)[_0xa581[11]]({rows:_0x715fxa[_0xa581[19]],count:_0x715fxa[_0xa581[19]][_0xa581[20]]})})[_0xa581[10]](function(_0x715fx9){return handleError(_0x715fx8,_0x715fx9)})}};exports[_0xa581[27]]= function(_0x715fx7,_0x715fx8,_0x715fxb){return UserHasChatQueue[_0xa581[28]]({where:{UserId:_0x715fx7[_0xa581[17]][_0xa581[16]]}})[_0xa581[13]](function(_0x715fxc){return _0x715fx8[_0xa581[12]](200)[_0xa581[11]](_0x715fxc)})[_0xa581[10]](function(_0x715fx9){return handleError(_0x715fx8,_0x715fx9)})};exports[_0xa581[29]]= function(_0x715fx7,_0x715fx8){return ChatQueue[_0xa581[18]](_0x715fx7[_0xa581[31]][_0xa581[16]])[_0xa581[13]](function(_0x715fxd){if(!_0x715fxd){return _0x715fx8[_0xa581[30]](404)};return _0x715fx8[_0xa581[11]](_0x715fxd)})[_0xa581[10]](function(_0x715fx9){return handleError(_0x715fx8,_0x715fx9)})};exports[_0xa581[32]]= function(_0x715fx7,_0x715fx8){return ChatQueue[_0xa581[18]](_0x715fx7[_0xa581[31]][_0xa581[16]])[_0xa581[13]](function(_0x715fxf){if(!_0x715fxf){return _0x715fx8[_0xa581[30]](404)};return _0x715fxf[_0xa581[37]]({where:{role:_0xa581[33]},attributes:[_0xa581[16],_0xa581[34],_0xa581[35],_0xa581[36]]})})[_0xa581[13]](function(_0x715fxe){return _0x715fx8[_0xa581[12]](200)[_0xa581[11]]({rows:_0x715fxe,count:_0x715fxe[_0xa581[20]]})})[_0xa581[10]](function(_0x715fx9){return handleError(_0x715fx8,_0x715fx9)})};exports[_0xa581[38]]= function(_0x715fx7,_0x715fx8){var _0x715fx10;return ChatQueue[_0xa581[38]](_0x715fx7[_0xa581[40]])[_0xa581[13]](function(_0x715fx11){_0x715fx10= _0x715fx11;if(_0x715fx7[_0xa581[40]][_0xa581[39]]){return _0x715fx10[_0xa581[42]](_0x715fx7[_0xa581[40]][_0xa581[39]],{penalty:_0x715fx7[_0xa581[40]][_0xa581[41]]|| 0,queue:_0x715fx10[_0xa581[34]]})}})[_0xa581[13]](function(){return _0x715fx8[_0xa581[12]](201)[_0xa581[11]](_0x715fx10)})[_0xa581[10]](function(_0x715fx9){return handleError(_0x715fx8,_0x715fx9)})};exports[_0xa581[43]]= function(_0x715fx7,_0x715fx8){if(_0x715fx7[_0xa581[40]][_0xa581[16]]){delete _0x715fx7[_0xa581[40]][_0xa581[16]]};return ChatQueue[_0xa581[18]](_0x715fx7[_0xa581[31]][_0xa581[16]])[_0xa581[13]](function(_0x715fxd){if(!_0x715fxd){return _0x715fx8[_0xa581[30]](404)};var _0x715fx12=_[_0xa581[22]](_0x715fxd,_0x715fx7[_0xa581[40]]);return _0x715fx12[_0xa581[44]]()})[_0xa581[13]](function(_0x715fxd){return _0x715fx8[_0xa581[12]](200)[_0xa581[11]](_0x715fxd)})[_0xa581[10]](function(_0x715fx9){return handleError(_0x715fx8,_0x715fx9)})};exports[_0xa581[45]]= function(_0x715fx7,_0x715fx8,_0x715fxb){return ChatQueue[_0xa581[18]](_0x715fx7[_0xa581[31]][_0xa581[16]])[_0xa581[13]](function(_0x715fx11){if(!_0x715fx11){return _0x715fx8[_0xa581[30]](404)};var _0x715fxc=_[_0xa581[46]](_0x715fx7[_0xa581[40]][_0xa581[39]],function(_0x715fx13){return {UserId:_0x715fx13,penalty:_0x715fx7[_0xa581[40]][_0xa581[41]],ChatQueueId:_0x715fx11[_0xa581[16]],queue:_0x715fx11[_0xa581[34]]}});return UserHasChatQueue[_0xa581[47]](_0x715fxc,{individualHooks:true})})[_0xa581[13]](function(){return _0x715fx8[_0xa581[30]](200)})[_0xa581[10]](function(_0x715fx9){return handleError(_0x715fx8,_0x715fx9)})};exports[_0xa581[48]]= function(_0x715fx7,_0x715fx8,_0x715fxb){return ChatQueue[_0xa581[18]](_0x715fx7[_0xa581[31]][_0xa581[16]])[_0xa581[13]](function(_0x715fx11){if(!_0x715fx11){return _0x715fx8[_0xa581[30]](404)};return _0x715fx11[_0xa581[49]](_0x715fx7[_0xa581[14]][_0xa581[39]],{individualHooks:true})})[_0xa581[13]](function(){return _0x715fx8[_0xa581[30]](200)})[_0xa581[10]](function(_0x715fx9){return handleError(_0x715fx8,_0x715fx9)})};exports[_0xa581[50]]= function(_0x715fx7,_0x715fx8){return ChatQueue[_0xa581[18]](_0x715fx7[_0xa581[31]][_0xa581[16]])[_0xa581[13]](function(_0x715fxd){if(!_0x715fxd){return _0x715fx8[_0xa581[30]](404)};return _0x715fxd[_0xa581[50]]()})[_0xa581[13]](function(){return _0x715fx8[_0xa581[30]](204)})[_0xa581[10]](function(_0x715fx9){return handleError(_0x715fx8,_0x715fx9)})};exports[_0xa581[51]]= function(_0x715fx7,_0x715fx8){return ChatQueue[_0xa581[50]]({where:{id:_0x715fx7[_0xa581[14]][_0xa581[52]]},individualHooks:true})[_0xa581[13]](function(){return _0x715fx8[_0xa581[30]](204)})[_0xa581[10]](function(_0x715fx9){return handleError(_0x715fx8,_0x715fx9)})};function handleError(_0x715fx8,_0x715fx9){logger[_0xa581[54]](_0x715fx9[_0xa581[53]]);return _0x715fx8[_0xa581[12]](500)[_0xa581[11]](_0x715fx9)}
\ No newline at end of file
+var _0xf20c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\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","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\x51\x75\x65\x75\x65","\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\x43\x68\x61\x74\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","\x72\x6F\x77\x73","\x6C\x65\x6E\x67\x74\x68","\x67\x65\x74\x51\x75\x65\x72\x79","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x72\x6F\x6C\x65","\x6D\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\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","\x61\x67\x65\x6E\x74","\x6E\x61\x6D\x65","\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","\x61\x67\x65\x6E\x74\x73","\x62\x6F\x64\x79","\x70\x65\x6E\x61\x6C\x74\x79","\x61\x64\x64\x55\x73\x65\x72\x73","\x75\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x6D\x61\x70","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x72\x65\x6D\x6F\x76\x65\x55\x73\x65\x72\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"];_0xf20c[0];var _=require(_0xf20c[1]);var Util=require(_0xf20c[2]);var logger=require(_0xf20c[4])(_0xf20c[3]);var ChatQueue=require(_0xf20c[6])[_0xf20c[5]];var User=require(_0xf20c[6])[_0xf20c[7]];var UserHasChatQueue=require(_0xf20c[6])[_0xf20c[8]];exports[_0xf20c[9]]= function(_0x7499x7,_0x7499x8){switch(_0x7499x7[_0xf20c[17]][_0xf20c[26]]){case _0xf20c[17]:return User[_0xf20c[18]](_0x7499x7[_0xf20c[17]][_0xf20c[16]],{attributes:[_0xf20c[16]]})[_0xf20c[13]](Util[_0xf20c[15]](_0x7499x7[_0xf20c[14]]))[_0xf20c[13]](function(_0x7499xa){_0x7499x8[_0xf20c[12]](200)[_0xf20c[11]](_0x7499xa)})[_0xf20c[10]](function(_0x7499x9){return handleError(_0x7499x8,_0x7499x9)});default:return ChatQueue[_0xf20c[25]](_0xf20c[24])[_0xf20c[23]](_[_0xf20c[22]](Util[_0xf20c[21]](_0x7499x7[_0xf20c[14]]),{distinct:true}))[_0xf20c[13]](function(_0x7499xa){return _0x7499x8[_0xf20c[12]](200)[_0xf20c[11]]({rows:_0x7499xa[_0xf20c[19]],count:_0x7499xa[_0xf20c[19]][_0xf20c[20]]})})[_0xf20c[10]](function(_0x7499x9){return handleError(_0x7499x8,_0x7499x9)})}};exports[_0xf20c[27]]= function(_0x7499x7,_0x7499x8,_0x7499xb){return UserHasChatQueue[_0xf20c[28]]({where:{UserId:_0x7499x7[_0xf20c[17]][_0xf20c[16]]}})[_0xf20c[13]](function(_0x7499xc){return _0x7499x8[_0xf20c[12]](200)[_0xf20c[11]](_0x7499xc)})[_0xf20c[10]](function(_0x7499x9){return handleError(_0x7499x8,_0x7499x9)})};exports[_0xf20c[29]]= function(_0x7499x7,_0x7499x8){return ChatQueue[_0xf20c[18]](_0x7499x7[_0xf20c[31]][_0xf20c[16]])[_0xf20c[13]](function(_0x7499xd){if(!_0x7499xd){return _0x7499x8[_0xf20c[30]](404)};return _0x7499x8[_0xf20c[11]](_0x7499xd)})[_0xf20c[10]](function(_0x7499x9){return handleError(_0x7499x8,_0x7499x9)})};exports[_0xf20c[32]]= function(_0x7499x7,_0x7499x8){return ChatQueue[_0xf20c[18]](_0x7499x7[_0xf20c[31]][_0xf20c[16]])[_0xf20c[13]](function(_0x7499xf){if(!_0x7499xf){return _0x7499x8[_0xf20c[30]](404)};return _0x7499xf[_0xf20c[37]]({where:{role:_0xf20c[33]},attributes:[_0xf20c[16],_0xf20c[34],_0xf20c[35],_0xf20c[36]]})})[_0xf20c[13]](function(_0x7499xe){return _0x7499x8[_0xf20c[12]](200)[_0xf20c[11]]({rows:_0x7499xe,count:_0x7499xe[_0xf20c[20]]})})[_0xf20c[10]](function(_0x7499x9){return handleError(_0x7499x8,_0x7499x9)})};exports[_0xf20c[38]]= function(_0x7499x7,_0x7499x8){var _0x7499x10;return ChatQueue[_0xf20c[38]](_0x7499x7[_0xf20c[40]])[_0xf20c[13]](function(_0x7499x11){_0x7499x10= _0x7499x11;if(_0x7499x7[_0xf20c[40]][_0xf20c[39]]){return _0x7499x10[_0xf20c[42]](_0x7499x7[_0xf20c[40]][_0xf20c[39]],{penalty:_0x7499x7[_0xf20c[40]][_0xf20c[41]]|| 0,queue:_0x7499x10[_0xf20c[34]]})}})[_0xf20c[13]](function(){return _0x7499x8[_0xf20c[12]](201)[_0xf20c[11]](_0x7499x10)})[_0xf20c[10]](function(_0x7499x9){return handleError(_0x7499x8,_0x7499x9)})};exports[_0xf20c[43]]= function(_0x7499x7,_0x7499x8){if(_0x7499x7[_0xf20c[40]][_0xf20c[16]]){delete _0x7499x7[_0xf20c[40]][_0xf20c[16]]};return ChatQueue[_0xf20c[18]](_0x7499x7[_0xf20c[31]][_0xf20c[16]])[_0xf20c[13]](function(_0x7499xd){if(!_0x7499xd){return _0x7499x8[_0xf20c[30]](404)};var _0x7499x12=_[_0xf20c[22]](_0x7499xd,_0x7499x7[_0xf20c[40]]);return _0x7499x12[_0xf20c[44]]()})[_0xf20c[13]](function(_0x7499xd){return _0x7499x8[_0xf20c[12]](200)[_0xf20c[11]](_0x7499xd)})[_0xf20c[10]](function(_0x7499x9){return handleError(_0x7499x8,_0x7499x9)})};exports[_0xf20c[45]]= function(_0x7499x7,_0x7499x8,_0x7499xb){return ChatQueue[_0xf20c[18]](_0x7499x7[_0xf20c[31]][_0xf20c[16]])[_0xf20c[13]](function(_0x7499x11){if(!_0x7499x11){return _0x7499x8[_0xf20c[30]](404)};var _0x7499xc=_[_0xf20c[46]](_0x7499x7[_0xf20c[40]][_0xf20c[39]],function(_0x7499x13){return {UserId:_0x7499x13,penalty:_0x7499x7[_0xf20c[40]][_0xf20c[41]],ChatQueueId:_0x7499x11[_0xf20c[16]],queue:_0x7499x11[_0xf20c[34]]}});return UserHasChatQueue[_0xf20c[47]](_0x7499xc,{individualHooks:true})})[_0xf20c[13]](function(){return _0x7499x8[_0xf20c[30]](200)})[_0xf20c[10]](function(_0x7499x9){return handleError(_0x7499x8,_0x7499x9)})};exports[_0xf20c[48]]= function(_0x7499x7,_0x7499x8,_0x7499xb){return ChatQueue[_0xf20c[18]](_0x7499x7[_0xf20c[31]][_0xf20c[16]])[_0xf20c[13]](function(_0x7499x11){if(!_0x7499x11){return _0x7499x8[_0xf20c[30]](404)};return _0x7499x11[_0xf20c[49]](_0x7499x7[_0xf20c[14]][_0xf20c[39]],{individualHooks:true})})[_0xf20c[13]](function(){return _0x7499x8[_0xf20c[30]](200)})[_0xf20c[10]](function(_0x7499x9){return handleError(_0x7499x8,_0x7499x9)})};exports[_0xf20c[50]]= function(_0x7499x7,_0x7499x8){return ChatQueue[_0xf20c[18]](_0x7499x7[_0xf20c[31]][_0xf20c[16]])[_0xf20c[13]](function(_0x7499xd){if(!_0x7499xd){return _0x7499x8[_0xf20c[30]](404)};return _0x7499xd[_0xf20c[50]]()})[_0xf20c[13]](function(){return _0x7499x8[_0xf20c[30]](204)})[_0xf20c[10]](function(_0x7499x9){return handleError(_0x7499x8,_0x7499x9)})};exports[_0xf20c[51]]= function(_0x7499x7,_0x7499x8){return ChatQueue[_0xf20c[50]]({where:{id:_0x7499x7[_0xf20c[14]][_0xf20c[52]]},individualHooks:true})[_0xf20c[13]](function(){return _0x7499x8[_0xf20c[30]](204)})[_0xf20c[10]](function(_0x7499x9){return handleError(_0x7499x8,_0x7499x9)})};function handleError(_0x7499x8,_0x7499x9){logger[_0xf20c[54]](_0x7499x9[_0xf20c[53]]);return _0x7499x8[_0xf20c[12]](500)[_0xf20c[11]](_0x7499x9)}
\ No newline at end of file