Built motion from commit 78ef1e9a0.|1.0.36
[motion.git] / server / api / chat_queue / chat_queue.controller.js
index 26c21c1..11354b7 100644 (file)
@@ -1 +1 @@
-var _0xa316=["\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"];_0xa316[0];var _=require(_0xa316[1]);var Util=require(_0xa316[2]);var logger=require(_0xa316[4])(_0xa316[3]);var ChatQueue=require(_0xa316[6])[_0xa316[5]];var User=require(_0xa316[6])[_0xa316[7]];var UserHasChatQueue=require(_0xa316[6])[_0xa316[8]];exports[_0xa316[9]]= function(_0x27aex7,_0x27aex8){switch(_0x27aex7[_0xa316[17]][_0xa316[26]]){case _0xa316[17]:return User[_0xa316[18]](_0x27aex7[_0xa316[17]][_0xa316[16]],{attributes:[_0xa316[16]]})[_0xa316[13]](Util[_0xa316[15]](_0x27aex7[_0xa316[14]]))[_0xa316[13]](function(_0x27aexa){_0x27aex8[_0xa316[12]](200)[_0xa316[11]](_0x27aexa)})[_0xa316[10]](function(_0x27aex9){return handleError(_0x27aex8,_0x27aex9)});default:return ChatQueue[_0xa316[25]](_0xa316[24])[_0xa316[23]](_[_0xa316[22]](Util[_0xa316[21]](_0x27aex7[_0xa316[14]]),{distinct:true}))[_0xa316[13]](function(_0x27aexa){return _0x27aex8[_0xa316[12]](200)[_0xa316[11]]({rows:_0x27aexa[_0xa316[19]],count:_0x27aexa[_0xa316[19]][_0xa316[20]]})})[_0xa316[10]](function(_0x27aex9){return handleError(_0x27aex8,_0x27aex9)})}};exports[_0xa316[27]]= function(_0x27aex7,_0x27aex8,_0x27aexb){return UserHasChatQueue[_0xa316[28]]({where:{UserId:_0x27aex7[_0xa316[17]][_0xa316[16]]}})[_0xa316[13]](function(_0x27aexc){return _0x27aex8[_0xa316[12]](200)[_0xa316[11]](_0x27aexc)})[_0xa316[10]](function(_0x27aex9){return handleError(_0x27aex8,_0x27aex9)})};exports[_0xa316[29]]= function(_0x27aex7,_0x27aex8){return ChatQueue[_0xa316[18]](_0x27aex7[_0xa316[31]][_0xa316[16]])[_0xa316[13]](function(_0x27aexd){if(!_0x27aexd){return _0x27aex8[_0xa316[30]](404)};return _0x27aex8[_0xa316[11]](_0x27aexd)})[_0xa316[10]](function(_0x27aex9){return handleError(_0x27aex8,_0x27aex9)})};exports[_0xa316[32]]= function(_0x27aex7,_0x27aex8){return ChatQueue[_0xa316[18]](_0x27aex7[_0xa316[31]][_0xa316[16]])[_0xa316[13]](function(_0x27aexf){if(!_0x27aexf){return _0x27aex8[_0xa316[30]](404)};return _0x27aexf[_0xa316[37]]({where:{role:_0xa316[33]},attributes:[_0xa316[16],_0xa316[34],_0xa316[35],_0xa316[36]]})})[_0xa316[13]](function(_0x27aexe){return _0x27aex8[_0xa316[12]](200)[_0xa316[11]]({rows:_0x27aexe,count:_0x27aexe[_0xa316[20]]})})[_0xa316[10]](function(_0x27aex9){return handleError(_0x27aex8,_0x27aex9)})};exports[_0xa316[38]]= function(_0x27aex7,_0x27aex8){var _0x27aex10;return ChatQueue[_0xa316[38]](_0x27aex7[_0xa316[40]])[_0xa316[13]](function(_0x27aex11){_0x27aex10= _0x27aex11;if(_0x27aex7[_0xa316[40]][_0xa316[39]]){return _0x27aex10[_0xa316[42]](_0x27aex7[_0xa316[40]][_0xa316[39]],{penalty:_0x27aex7[_0xa316[40]][_0xa316[41]]|| 0,queue:_0x27aex10[_0xa316[34]]})}})[_0xa316[13]](function(){return _0x27aex8[_0xa316[12]](201)[_0xa316[11]](_0x27aex10)})[_0xa316[10]](function(_0x27aex9){return handleError(_0x27aex8,_0x27aex9)})};exports[_0xa316[43]]= function(_0x27aex7,_0x27aex8){if(_0x27aex7[_0xa316[40]][_0xa316[16]]){delete _0x27aex7[_0xa316[40]][_0xa316[16]]};return ChatQueue[_0xa316[18]](_0x27aex7[_0xa316[31]][_0xa316[16]])[_0xa316[13]](function(_0x27aexd){if(!_0x27aexd){return _0x27aex8[_0xa316[30]](404)};var _0x27aex12=_[_0xa316[22]](_0x27aexd,_0x27aex7[_0xa316[40]]);return _0x27aex12[_0xa316[44]]()})[_0xa316[13]](function(_0x27aexd){return _0x27aex8[_0xa316[12]](200)[_0xa316[11]](_0x27aexd)})[_0xa316[10]](function(_0x27aex9){return handleError(_0x27aex8,_0x27aex9)})};exports[_0xa316[45]]= function(_0x27aex7,_0x27aex8,_0x27aexb){return ChatQueue[_0xa316[18]](_0x27aex7[_0xa316[31]][_0xa316[16]])[_0xa316[13]](function(_0x27aex11){if(!_0x27aex11){return _0x27aex8[_0xa316[30]](404)};var _0x27aexc=_[_0xa316[46]](_0x27aex7[_0xa316[40]][_0xa316[39]],function(_0x27aex13){return {UserId:_0x27aex13,penalty:_0x27aex7[_0xa316[40]][_0xa316[41]],ChatQueueId:_0x27aex11[_0xa316[16]],queue:_0x27aex11[_0xa316[34]]}});return UserHasChatQueue[_0xa316[47]](_0x27aexc,{individualHooks:true})})[_0xa316[13]](function(){return _0x27aex8[_0xa316[30]](200)})[_0xa316[10]](function(_0x27aex9){return handleError(_0x27aex8,_0x27aex9)})};exports[_0xa316[48]]= function(_0x27aex7,_0x27aex8,_0x27aexb){return ChatQueue[_0xa316[18]](_0x27aex7[_0xa316[31]][_0xa316[16]])[_0xa316[13]](function(_0x27aex11){if(!_0x27aex11){return _0x27aex8[_0xa316[30]](404)};return _0x27aex11[_0xa316[49]](_0x27aex7[_0xa316[14]][_0xa316[39]],{individualHooks:true})})[_0xa316[13]](function(){return _0x27aex8[_0xa316[30]](200)})[_0xa316[10]](function(_0x27aex9){return handleError(_0x27aex8,_0x27aex9)})};exports[_0xa316[50]]= function(_0x27aex7,_0x27aex8){return ChatQueue[_0xa316[18]](_0x27aex7[_0xa316[31]][_0xa316[16]])[_0xa316[13]](function(_0x27aexd){if(!_0x27aexd){return _0x27aex8[_0xa316[30]](404)};return _0x27aexd[_0xa316[50]]()})[_0xa316[13]](function(){return _0x27aex8[_0xa316[30]](204)})[_0xa316[10]](function(_0x27aex9){return handleError(_0x27aex8,_0x27aex9)})};exports[_0xa316[51]]= function(_0x27aex7,_0x27aex8){return ChatQueue[_0xa316[50]]({where:{id:_0x27aex7[_0xa316[14]][_0xa316[52]]},individualHooks:true})[_0xa316[13]](function(){return _0x27aex8[_0xa316[30]](204)})[_0xa316[10]](function(_0x27aex9){return handleError(_0x27aex8,_0x27aex9)})};function handleError(_0x27aex8,_0x27aex9){logger[_0xa316[54]](_0x27aex9[_0xa316[53]]);return _0x27aex8[_0xa316[12]](500)[_0xa316[11]](_0x27aex9)}
\ No newline at end of file
+var _0x794a=["\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"];_0x794a[0];var _=require(_0x794a[1]);var Util=require(_0x794a[2]);var logger=require(_0x794a[4])(_0x794a[3]);var ChatQueue=require(_0x794a[6])[_0x794a[5]];var User=require(_0x794a[6])[_0x794a[7]];var UserHasChatQueue=require(_0x794a[6])[_0x794a[8]];exports[_0x794a[9]]= function(_0xf083x7,_0xf083x8){switch(_0xf083x7[_0x794a[17]][_0x794a[26]]){case _0x794a[17]:return User[_0x794a[18]](_0xf083x7[_0x794a[17]][_0x794a[16]],{attributes:[_0x794a[16]]})[_0x794a[13]](Util[_0x794a[15]](_0xf083x7[_0x794a[14]]))[_0x794a[13]](function(_0xf083xa){_0xf083x8[_0x794a[12]](200)[_0x794a[11]](_0xf083xa)})[_0x794a[10]](function(_0xf083x9){return handleError(_0xf083x8,_0xf083x9)});default:return ChatQueue[_0x794a[25]](_0x794a[24])[_0x794a[23]](_[_0x794a[22]](Util[_0x794a[21]](_0xf083x7[_0x794a[14]]),{distinct:true}))[_0x794a[13]](function(_0xf083xa){return _0xf083x8[_0x794a[12]](200)[_0x794a[11]]({rows:_0xf083xa[_0x794a[19]],count:_0xf083xa[_0x794a[19]][_0x794a[20]]})})[_0x794a[10]](function(_0xf083x9){return handleError(_0xf083x8,_0xf083x9)})}};exports[_0x794a[27]]= function(_0xf083x7,_0xf083x8,_0xf083xb){return UserHasChatQueue[_0x794a[28]]({where:{UserId:_0xf083x7[_0x794a[17]][_0x794a[16]]}})[_0x794a[13]](function(_0xf083xc){return _0xf083x8[_0x794a[12]](200)[_0x794a[11]](_0xf083xc)})[_0x794a[10]](function(_0xf083x9){return handleError(_0xf083x8,_0xf083x9)})};exports[_0x794a[29]]= function(_0xf083x7,_0xf083x8){return ChatQueue[_0x794a[18]](_0xf083x7[_0x794a[31]][_0x794a[16]])[_0x794a[13]](function(_0xf083xd){if(!_0xf083xd){return _0xf083x8[_0x794a[30]](404)};return _0xf083x8[_0x794a[11]](_0xf083xd)})[_0x794a[10]](function(_0xf083x9){return handleError(_0xf083x8,_0xf083x9)})};exports[_0x794a[32]]= function(_0xf083x7,_0xf083x8){return ChatQueue[_0x794a[18]](_0xf083x7[_0x794a[31]][_0x794a[16]])[_0x794a[13]](function(_0xf083xf){if(!_0xf083xf){return _0xf083x8[_0x794a[30]](404)};return _0xf083xf[_0x794a[37]]({where:{role:_0x794a[33]},attributes:[_0x794a[16],_0x794a[34],_0x794a[35],_0x794a[36]]})})[_0x794a[13]](function(_0xf083xe){return _0xf083x8[_0x794a[12]](200)[_0x794a[11]]({rows:_0xf083xe,count:_0xf083xe[_0x794a[20]]})})[_0x794a[10]](function(_0xf083x9){return handleError(_0xf083x8,_0xf083x9)})};exports[_0x794a[38]]= function(_0xf083x7,_0xf083x8){var _0xf083x10;return ChatQueue[_0x794a[38]](_0xf083x7[_0x794a[40]])[_0x794a[13]](function(_0xf083x11){_0xf083x10= _0xf083x11;if(_0xf083x7[_0x794a[40]][_0x794a[39]]){return _0xf083x10[_0x794a[42]](_0xf083x7[_0x794a[40]][_0x794a[39]],{penalty:_0xf083x7[_0x794a[40]][_0x794a[41]]|| 0,queue:_0xf083x10[_0x794a[34]]})}})[_0x794a[13]](function(){return _0xf083x8[_0x794a[12]](201)[_0x794a[11]](_0xf083x10)})[_0x794a[10]](function(_0xf083x9){return handleError(_0xf083x8,_0xf083x9)})};exports[_0x794a[43]]= function(_0xf083x7,_0xf083x8){if(_0xf083x7[_0x794a[40]][_0x794a[16]]){delete _0xf083x7[_0x794a[40]][_0x794a[16]]};return ChatQueue[_0x794a[18]](_0xf083x7[_0x794a[31]][_0x794a[16]])[_0x794a[13]](function(_0xf083xd){if(!_0xf083xd){return _0xf083x8[_0x794a[30]](404)};var _0xf083x12=_[_0x794a[22]](_0xf083xd,_0xf083x7[_0x794a[40]]);return _0xf083x12[_0x794a[44]]()})[_0x794a[13]](function(_0xf083xd){return _0xf083x8[_0x794a[12]](200)[_0x794a[11]](_0xf083xd)})[_0x794a[10]](function(_0xf083x9){return handleError(_0xf083x8,_0xf083x9)})};exports[_0x794a[45]]= function(_0xf083x7,_0xf083x8,_0xf083xb){return ChatQueue[_0x794a[18]](_0xf083x7[_0x794a[31]][_0x794a[16]])[_0x794a[13]](function(_0xf083x11){if(!_0xf083x11){return _0xf083x8[_0x794a[30]](404)};var _0xf083xc=_[_0x794a[46]](_0xf083x7[_0x794a[40]][_0x794a[39]],function(_0xf083x13){return {UserId:_0xf083x13,penalty:_0xf083x7[_0x794a[40]][_0x794a[41]],ChatQueueId:_0xf083x11[_0x794a[16]],queue:_0xf083x11[_0x794a[34]]}});return UserHasChatQueue[_0x794a[47]](_0xf083xc,{individualHooks:true})})[_0x794a[13]](function(){return _0xf083x8[_0x794a[30]](200)})[_0x794a[10]](function(_0xf083x9){return handleError(_0xf083x8,_0xf083x9)})};exports[_0x794a[48]]= function(_0xf083x7,_0xf083x8,_0xf083xb){return ChatQueue[_0x794a[18]](_0xf083x7[_0x794a[31]][_0x794a[16]])[_0x794a[13]](function(_0xf083x11){if(!_0xf083x11){return _0xf083x8[_0x794a[30]](404)};return _0xf083x11[_0x794a[49]](_0xf083x7[_0x794a[14]][_0x794a[39]],{individualHooks:true})})[_0x794a[13]](function(){return _0xf083x8[_0x794a[30]](200)})[_0x794a[10]](function(_0xf083x9){return handleError(_0xf083x8,_0xf083x9)})};exports[_0x794a[50]]= function(_0xf083x7,_0xf083x8){return ChatQueue[_0x794a[18]](_0xf083x7[_0x794a[31]][_0x794a[16]])[_0x794a[13]](function(_0xf083xd){if(!_0xf083xd){return _0xf083x8[_0x794a[30]](404)};return _0xf083xd[_0x794a[50]]()})[_0x794a[13]](function(){return _0xf083x8[_0x794a[30]](204)})[_0x794a[10]](function(_0xf083x9){return handleError(_0xf083x8,_0xf083x9)})};exports[_0x794a[51]]= function(_0xf083x7,_0xf083x8){return ChatQueue[_0x794a[50]]({where:{id:_0xf083x7[_0x794a[14]][_0x794a[52]]},individualHooks:true})[_0x794a[13]](function(){return _0xf083x8[_0x794a[30]](204)})[_0x794a[10]](function(_0xf083x9){return handleError(_0xf083x8,_0xf083x9)})};function handleError(_0xf083x8,_0xf083x9){logger[_0x794a[54]](_0xf083x9[_0x794a[53]]);return _0xf083x8[_0x794a[12]](500)[_0x794a[11]](_0xf083x9)}
\ No newline at end of file