Built motion from commit 42469bf.|0.0.59
[motion.git] / server / api / chat_queue / chat_queue.controller.js
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)}