Built motion from commit 3594e56.|0.0.120
[motion.git] / server / api / chat_queue / chat_queue.controller.js
index 87995f3..3d16b21 100644 (file)
@@ -1 +1 @@
-var _0x7379=["\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","\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\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\x51\x75\x65\x72\x79","\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","\x6D\x65","\x69\x64","\x75\x73\x65\x72","\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","\x66\x69\x6E\x64\x42\x79\x49\x64","\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","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x61\x67\x65\x6E\x74\x73","\x70\x65\x6E\x61\x6C\x74\x79","\x61\x64\x64\x55\x73\x65\x72\x73","\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"];_0x7379[0];var _=require(_0x7379[1]);var Util=require(_0x7379[2]);var ChatQueue=require(_0x7379[4])[_0x7379[3]];var UserHasChatQueue=require(_0x7379[4])[_0x7379[5]];exports[_0x7379[6]]=function(_0xb63fx5,_0xb63fx6){return ChatQueue[_0x7379[15]](_0x7379[14])[_0x7379[13]](Util[_0x7379[12]](_0xb63fx5[_0x7379[11]]))[_0x7379[10]](function(_0xb63fx8){_0xb63fx6[_0x7379[9]](200)[_0x7379[8]](_0xb63fx8)})[_0x7379[7]](function(_0xb63fx7){return handleError(_0xb63fx6,_0xb63fx7)})};exports[_0x7379[16]]=function(_0xb63fx5,_0xb63fx6,_0xb63fx9){UserHasChatQueue[_0x7379[19]]({where:{UserId:_0xb63fx5[_0x7379[18]][_0x7379[17]]}})[_0x7379[10]](function(_0xb63fxa){return _0xb63fx6[_0x7379[9]](200)[_0x7379[8]](_0xb63fxa)})[_0x7379[7]](function(_0xb63fx7){return handleError(_0xb63fx6,_0xb63fx7)})};exports[_0x7379[20]]=function(_0xb63fx5,_0xb63fx6){ChatQueue[_0x7379[23]](_0xb63fx5[_0x7379[22]][_0x7379[17]])[_0x7379[10]](function(_0xb63fxb){if(!_0xb63fxb){return _0xb63fx6[_0x7379[21]](404)};return _0xb63fx6[_0x7379[8]](_0xb63fxb)})[_0x7379[7]](function(_0xb63fx7){return handleError(_0xb63fx6,_0xb63fx7)})};exports[_0x7379[24]]=function(_0xb63fx5,_0xb63fx6){return ChatQueue[_0x7379[23]](_0xb63fx5[_0x7379[22]][_0x7379[17]])[_0x7379[10]](function(_0xb63fxd){if(!_0xb63fxd){return _0xb63fx6[_0x7379[21]](404)};return _0xb63fxd[_0x7379[29]]({where:{role:_0x7379[25]},attributes:[_0x7379[17],_0x7379[26],_0x7379[27],_0x7379[28]]})})[_0x7379[10]](function(_0xb63fxc){return _0xb63fx6[_0x7379[9]](200)[_0x7379[8]](_0xb63fxc)})[_0x7379[7]](function(_0xb63fx7){return handleError(_0xb63fx6,_0xb63fx7)})};exports[_0x7379[30]]=function(_0xb63fx5,_0xb63fx6){return ChatQueue[_0x7379[30]](_0xb63fx5[_0x7379[31]])[_0x7379[10]](function(_0xb63fxb){return _0xb63fx6[_0x7379[9]](201)[_0x7379[8]](_0xb63fxb)})[_0x7379[7]](function(_0xb63fx7){return handleError(_0xb63fx6,_0xb63fx7)})};exports[_0x7379[32]]=function(_0xb63fx5,_0xb63fx6){if(_0xb63fx5[_0x7379[31]][_0x7379[17]]){delete _0xb63fx5[_0x7379[31]][_0x7379[17]]};return ChatQueue[_0x7379[23]](_0xb63fx5[_0x7379[22]][_0x7379[17]])[_0x7379[10]](function(_0xb63fxb){if(!_0xb63fxb){return _0xb63fx6[_0x7379[21]](404)};var _0xb63fxe=_[_0x7379[33]](_0xb63fxb,_0xb63fx5[_0x7379[31]]);_0xb63fxe[_0x7379[34]]()[_0x7379[10]](function(){return _0xb63fx6[_0x7379[9]](200)[_0x7379[8]](_0xb63fxb)})[_0x7379[7]](function(_0xb63fx7){return handleError(_0xb63fx6,_0xb63fx7)})})[_0x7379[7]](function(_0xb63fx7){return handleError(_0xb63fx6,_0xb63fx7)})};exports[_0x7379[35]]=function(_0xb63fx5,_0xb63fx6,_0xb63fx9){return ChatQueue[_0x7379[23]](_0xb63fx5[_0x7379[22]][_0x7379[17]])[_0x7379[10]](function(_0xb63fxf){if(!_0xb63fxf){return _0xb63fx6[_0x7379[21]](404)};return _0xb63fxf[_0x7379[38]](_0xb63fx5[_0x7379[31]][_0x7379[36]],{penalty:_0xb63fx5[_0x7379[31]][_0x7379[37]]},{individualHooks:true})})[_0x7379[10]](function(){return _0xb63fx6[_0x7379[21]](200)})[_0x7379[7]](function(_0xb63fx7){return handleError(_0xb63fx6,_0xb63fx7)})};exports[_0x7379[39]]=function(_0xb63fx5,_0xb63fx6,_0xb63fx9){return ChatQueue[_0x7379[23]](_0xb63fx5[_0x7379[22]][_0x7379[17]])[_0x7379[10]](function(_0xb63fxf){if(!_0xb63fxf){return _0xb63fx6[_0x7379[21]](404)};return _0xb63fxf[_0x7379[40]](_0xb63fx5[_0x7379[11]][_0x7379[36]],{individualHooks:true})})[_0x7379[10]](function(){return _0xb63fx6[_0x7379[21]](200)})[_0x7379[7]](function(_0xb63fx7){return handleError(_0xb63fx6,_0xb63fx7)})};exports[_0x7379[41]]=function(_0xb63fx5,_0xb63fx6){ChatQueue[_0x7379[23]](_0xb63fx5[_0x7379[22]][_0x7379[17]])[_0x7379[10]](function(_0xb63fxb){if(!_0xb63fxb){return _0xb63fx6[_0x7379[21]](404)};_0xb63fxb[_0x7379[41]]()[_0x7379[10]](function(){return _0xb63fx6[_0x7379[21]](204)})[_0x7379[7]](function(_0xb63fx7){return handleError(_0xb63fx6,_0xb63fx7)})})[_0x7379[7]](function(_0xb63fx7){return handleError(_0xb63fx6,_0xb63fx7)})};exports[_0x7379[42]]=function(_0xb63fx5,_0xb63fx6){return ChatQueue[_0x7379[41]]({where:{id:_0xb63fx5[_0x7379[11]][_0x7379[43]]},individualHooks:true})[_0x7379[10]](function(){return _0xb63fx6[_0x7379[21]](204)})[_0x7379[7]](function(_0xb63fx7){return handleError(_0xb63fx6,_0xb63fx7)})};function handleError(_0xb63fx6,_0xb63fx7){return _0xb63fx6[_0x7379[9]](500)[_0x7379[8]](_0xb63fx7)}
\ No newline at end of file
+var _0xa177=["\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","\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","\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","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x61\x67\x65\x6E\x74\x73","\x70\x65\x6E\x61\x6C\x74\x79","\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"];_0xa177[0];var _=require(_0xa177[1]);var Util=require(_0xa177[2]);var ChatQueue=require(_0xa177[4])[_0xa177[3]];var User=require(_0xa177[4])[_0xa177[5]];var UserHasChatQueue=require(_0xa177[4])[_0xa177[6]];exports[_0xa177[7]]= function(_0xb7efx6,_0xb7efx7){switch(_0xb7efx6[_0xa177[15]][_0xa177[23]]){case _0xa177[15]:return User[_0xa177[16]](_0xb7efx6[_0xa177[15]][_0xa177[14]],{attributes:[_0xa177[14]]})[_0xa177[11]](Util[_0xa177[13]](_0xb7efx6[_0xa177[12]]))[_0xa177[11]](function(_0xb7efx9){_0xb7efx7[_0xa177[10]](200)[_0xa177[9]](_0xb7efx9)})[_0xa177[8]](function(_0xb7efx8){return handleError(_0xb7efx7,_0xb7efx8)});default:return ChatQueue[_0xa177[22]](_0xa177[21])[_0xa177[20]](Util[_0xa177[19]](_0xb7efx6[_0xa177[12]]))[_0xa177[11]](function(_0xb7efx9){return _0xb7efx7[_0xa177[10]](200)[_0xa177[9]]({rows:_0xb7efx9[_0xa177[17]],count:_0xb7efx9[_0xa177[17]][_0xa177[18]]})})[_0xa177[8]](function(_0xb7efx8){return handleError(_0xb7efx7,_0xb7efx8)})}};exports[_0xa177[24]]= function(_0xb7efx6,_0xb7efx7,_0xb7efxa){return UserHasChatQueue[_0xa177[25]]({where:{UserId:_0xb7efx6[_0xa177[15]][_0xa177[14]]}})[_0xa177[11]](function(_0xb7efxb){return _0xb7efx7[_0xa177[10]](200)[_0xa177[9]](_0xb7efxb)})[_0xa177[8]](function(_0xb7efx8){return handleError(_0xb7efx7,_0xb7efx8)})};exports[_0xa177[26]]= function(_0xb7efx6,_0xb7efx7){return ChatQueue[_0xa177[16]](_0xb7efx6[_0xa177[28]][_0xa177[14]])[_0xa177[11]](function(_0xb7efxc){if(!_0xb7efxc){return _0xb7efx7[_0xa177[27]](404)};return _0xb7efx7[_0xa177[9]](_0xb7efxc)})[_0xa177[8]](function(_0xb7efx8){return handleError(_0xb7efx7,_0xb7efx8)})};exports[_0xa177[29]]= function(_0xb7efx6,_0xb7efx7){return ChatQueue[_0xa177[16]](_0xb7efx6[_0xa177[28]][_0xa177[14]])[_0xa177[11]](function(_0xb7efxe){if(!_0xb7efxe){return _0xb7efx7[_0xa177[27]](404)};return _0xb7efxe[_0xa177[34]]({where:{role:_0xa177[30]},attributes:[_0xa177[14],_0xa177[31],_0xa177[32],_0xa177[33]]})})[_0xa177[11]](function(_0xb7efxd){return _0xb7efx7[_0xa177[10]](200)[_0xa177[9]]({rows:_0xb7efxd,count:_0xb7efxd[_0xa177[18]]})})[_0xa177[8]](function(_0xb7efx8){return handleError(_0xb7efx7,_0xb7efx8)})};exports[_0xa177[35]]= function(_0xb7efx6,_0xb7efx7){return ChatQueue[_0xa177[35]](_0xb7efx6[_0xa177[36]])[_0xa177[11]](function(_0xb7efxc){return _0xb7efx7[_0xa177[10]](201)[_0xa177[9]](_0xb7efxc)})[_0xa177[8]](function(_0xb7efx8){return handleError(_0xb7efx7,_0xb7efx8)})};exports[_0xa177[37]]= function(_0xb7efx6,_0xb7efx7){if(_0xb7efx6[_0xa177[36]][_0xa177[14]]){delete _0xb7efx6[_0xa177[36]][_0xa177[14]]};return ChatQueue[_0xa177[16]](_0xb7efx6[_0xa177[28]][_0xa177[14]])[_0xa177[11]](function(_0xb7efxc){if(!_0xb7efxc){return _0xb7efx7[_0xa177[27]](404)};var _0xb7efxf=_[_0xa177[38]](_0xb7efxc,_0xb7efx6[_0xa177[36]]);return _0xb7efxf[_0xa177[39]]()})[_0xa177[11]](function(_0xb7efxc){return _0xb7efx7[_0xa177[10]](200)[_0xa177[9]](_0xb7efxc)})[_0xa177[8]](function(_0xb7efx8){return handleError(_0xb7efx7,_0xb7efx8)})};exports[_0xa177[40]]= function(_0xb7efx6,_0xb7efx7,_0xb7efxa){return ChatQueue[_0xa177[16]](_0xb7efx6[_0xa177[28]][_0xa177[14]])[_0xa177[11]](function(_0xb7efx10){if(!_0xb7efx10){return _0xb7efx7[_0xa177[27]](404)};var _0xb7efxb=_[_0xa177[43]](_0xb7efx6[_0xa177[36]][_0xa177[41]],function(_0xb7efx11){return {UserId:_0xb7efx11,penalty:_0xb7efx6[_0xa177[36]][_0xa177[42]],ChatQueueId:_0xb7efx10[_0xa177[14]],queue:_0xb7efx10[_0xa177[31]]}});return UserHasChatQueue[_0xa177[44]](_0xb7efxb,{individualHooks:true})})[_0xa177[11]](function(){return _0xb7efx7[_0xa177[27]](200)})[_0xa177[8]](function(_0xb7efx8){return handleError(_0xb7efx7,_0xb7efx8)})};exports[_0xa177[45]]= function(_0xb7efx6,_0xb7efx7,_0xb7efxa){return ChatQueue[_0xa177[16]](_0xb7efx6[_0xa177[28]][_0xa177[14]])[_0xa177[11]](function(_0xb7efx10){if(!_0xb7efx10){return _0xb7efx7[_0xa177[27]](404)};return _0xb7efx10[_0xa177[46]](_0xb7efx6[_0xa177[12]][_0xa177[41]],{individualHooks:true})})[_0xa177[11]](function(){return _0xb7efx7[_0xa177[27]](200)})[_0xa177[8]](function(_0xb7efx8){return handleError(_0xb7efx7,_0xb7efx8)})};exports[_0xa177[47]]= function(_0xb7efx6,_0xb7efx7){return ChatQueue[_0xa177[16]](_0xb7efx6[_0xa177[28]][_0xa177[14]])[_0xa177[11]](function(_0xb7efxc){if(!_0xb7efxc){return _0xb7efx7[_0xa177[27]](404)};return _0xb7efxc[_0xa177[47]]()})[_0xa177[11]](function(){return _0xb7efx7[_0xa177[27]](204)})[_0xa177[8]](function(_0xb7efx8){return handleError(_0xb7efx7,_0xb7efx8)})};exports[_0xa177[48]]= function(_0xb7efx6,_0xb7efx7){return ChatQueue[_0xa177[47]]({where:{id:_0xb7efx6[_0xa177[12]][_0xa177[49]]},individualHooks:true})[_0xa177[11]](function(){return _0xb7efx7[_0xa177[27]](204)})[_0xa177[8]](function(_0xb7efx8){return handleError(_0xb7efx7,_0xb7efx8)})};function handleError(_0xb7efx7,_0xb7efx8){return _0xb7efx7[_0xa177[10]](500)[_0xa177[9]](_0xb7efx8)}
\ No newline at end of file