Built motion from commit f1f5024.|1.0.16
[motion.git] / server / api / openchannel_queue / openchannel_queue.controller.js
index 09c618d..daef49d 100644 (file)
@@ -1 +1 @@
-var _0x636a=["\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","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x55\x73\x65\x72\x48\x61\x73\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\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","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x72\x6F\x6C\x65","\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","\x6C\x65\x6E\x67\x74\x68","\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","\x68\x61\x6E\x64\x6C\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x4D\x61\x6E\x61\x67\x65\x72","\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","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x20\x51\x75\x65\x75\x65\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x64\x65\x73\x74\x72\x6F\x79","\x65\x72\x72","\x65\x72\x72\x6F\x72","\x71\x75\x65\x75\x65","\x68\x61\x6E\x64\x6C\x65\x46\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0x636a[0];var _=require(_0x636a[1]);var Util=require(_0x636a[2]);var OpenchannelQueue=require(_0x636a[4])[_0x636a[3]];var User=require(_0x636a[4])[_0x636a[5]];var sequelize=require(_0x636a[4])[_0x636a[6]];var UserHasOpenchannelQueue=require(_0x636a[4])[_0x636a[7]];function handleError(_0xd63bx8,_0xd63bx9){return _0xd63bx8[_0x636a[9]](500)[_0x636a[8]](_0xd63bx9)}exports[_0x636a[10]]= function(_0xd63bxa,_0xd63bx8){switch(_0xd63bxa[_0x636a[16]][_0x636a[22]]){case _0x636a[16]:return User[_0x636a[17]](_0xd63bxa[_0x636a[16]][_0x636a[15]],{attributes:[_0x636a[15]]})[_0x636a[12]](Util[_0x636a[14]](_0xd63bxa[_0x636a[13]]))[_0x636a[12]](function(_0xd63bxb){_0xd63bx8[_0x636a[9]](200)[_0x636a[8]](_0xd63bxb)})[_0x636a[11]](function(_0xd63bx9){return handleError(_0xd63bx8,_0xd63bx9)});default:return OpenchannelQueue[_0x636a[21]](_0x636a[20])[_0x636a[19]](Util[_0x636a[18]](_0xd63bxa[_0x636a[13]]))[_0x636a[12]](function(_0xd63bxb){_0xd63bx8[_0x636a[9]](200)[_0x636a[8]](_0xd63bxb)})[_0x636a[11]](function(_0xd63bx9){return handleError(_0xd63bx8,_0xd63bx9)})}};exports[_0x636a[23]]= function(_0xd63bxa,_0xd63bx8){return OpenchannelQueue[_0x636a[21]](_0x636a[20])[_0x636a[17]](_0xd63bxa[_0x636a[25]][_0x636a[15]])[_0x636a[12]](function(_0xd63bxc){if(!_0xd63bxc){return _0xd63bx8[_0x636a[24]](404)};return _0xd63bx8[_0x636a[8]](_0xd63bxc)})[_0x636a[11]](function(_0xd63bx9){return handleError(_0xd63bx8,_0xd63bx9)})};exports[_0x636a[26]]= function(_0xd63bxa,_0xd63bx8){return OpenchannelQueue[_0x636a[17]](_0xd63bxa[_0x636a[25]][_0x636a[15]])[_0x636a[12]](function(_0xd63bxe){if(!_0xd63bxe){return _0xd63bx8[_0x636a[24]](404)};return _0xd63bxe[_0x636a[32]]({where:{role:_0x636a[28]},attributes:[_0x636a[15],_0x636a[29],_0x636a[30],_0x636a[31]]})})[_0x636a[12]](function(_0xd63bxd){return _0xd63bx8[_0x636a[9]](200)[_0x636a[8]]({rows:_0xd63bxd,count:_0xd63bxd[_0x636a[27]]})})[_0x636a[11]](function(_0xd63bx9){return handleError(_0xd63bx8,_0xd63bx9)})};exports[_0x636a[33]]= function(_0xd63bxa,_0xd63bx8){return OpenchannelQueue[_0x636a[33]](_0xd63bxa[_0x636a[36]])[_0x636a[12]](function(_0xd63bxc){return _0xd63bx8[_0x636a[9]](201)[_0x636a[8]](_0xd63bxc)})[_0x636a[11]](sequelize.UniqueConstraintError,function(_0xd63bx9){return Util[_0x636a[35]][_0x636a[34]](_0xd63bx8,_0xd63bx9)})[_0x636a[11]](function(_0xd63bx9){return handleError(_0xd63bx8,_0xd63bx9)})};exports[_0x636a[37]]= function(_0xd63bxa,_0xd63bx8){if(_0xd63bxa[_0x636a[36]][_0x636a[15]]){delete _0xd63bxa[_0x636a[36]][_0x636a[15]]};return OpenchannelQueue[_0x636a[17]](_0xd63bxa[_0x636a[25]][_0x636a[15]])[_0x636a[12]](function(_0xd63bxc){if(!_0xd63bxc){return _0xd63bx8[_0x636a[24]](404)};var _0xd63bxf=_[_0x636a[38]](_0xd63bxc,_0xd63bxa[_0x636a[36]]);return _0xd63bxf[_0x636a[39]]()})[_0x636a[12]](function(_0xd63bxc){return _0xd63bx8[_0x636a[9]](200)[_0x636a[8]](_0xd63bxc)})[_0x636a[11]](sequelize.UniqueConstraintError,function(_0xd63bx9){return Util[_0x636a[35]][_0x636a[34]](_0xd63bx8,_0xd63bx9)})[_0x636a[11]](function(_0xd63bx9){return handleError(_0xd63bx8,_0xd63bx9)})};exports[_0x636a[40]]= function(_0xd63bxa,_0xd63bx8,_0xd63bx10){return OpenchannelQueue[_0x636a[17]](_0xd63bxa[_0x636a[25]][_0x636a[15]])[_0x636a[12]](function(_0xd63bxc){if(!_0xd63bxc){return _0xd63bx8[_0x636a[24]](404)};var _0xd63bx11=_[_0x636a[43]](_0xd63bxa[_0x636a[36]][_0x636a[41]],function(_0xd63bx12){return {UserId:_0xd63bx12,penalty:_0xd63bxa[_0x636a[36]][_0x636a[42]],OpenchannelQueueId:_0xd63bxc[_0x636a[15]],queue:_0xd63bxc[_0x636a[29]]}});return UserHasOpenchannelQueue[_0x636a[44]](_0xd63bx11,{individualHooks:true})})[_0x636a[12]](function(){return _0xd63bx8[_0x636a[24]](200)})[_0x636a[11]](function(_0xd63bx9){return handleError(_0xd63bx8,_0xd63bx9)})};exports[_0x636a[45]]= function(_0xd63bxa,_0xd63bx8){return OpenchannelQueue[_0x636a[17]](_0xd63bxa[_0x636a[25]][_0x636a[15]])[_0x636a[12]](function(_0xd63bxc){if(_0xd63bxc){return _0xd63bxc[_0x636a[46]](_0xd63bxa[_0x636a[13]][_0x636a[41]],{individualHooks:true})}else {throw  new Error(_0x636a[47])}})[_0x636a[12]](function(){return _0xd63bx8[_0x636a[24]](202)})[_0x636a[11]](function(_0xd63bx9){return handleError(_0xd63bx8,_0xd63bx9)})};exports[_0x636a[48]]= function(_0xd63bxa,_0xd63bx8){var _0xd63bx13;return OpenchannelQueue[_0x636a[17]](_0xd63bxa[_0x636a[25]][_0x636a[15]])[_0x636a[12]](function(_0xd63bxc){_0xd63bx13= _0xd63bxc;if(!_0xd63bxc){return _0xd63bx8[_0x636a[24]](404)};return _0xd63bxc[_0x636a[48]]()})[_0x636a[12]](function(){return _0xd63bx8[_0x636a[24]](204)})[_0x636a[11]](sequelize.ForeignKeyConstraintError,function(_0xd63bx9){return Util[_0x636a[35]][_0x636a[52]](_0xd63bx8,_0x636a[51],_0xd63bx13[_0x636a[29]],_0xd63bx9)})[_0x636a[11]](function(_0xd63bx9){console[_0x636a[50]](_0x636a[49],_0xd63bx9);return handleError(_0xd63bx8,_0xd63bx9)})};exports[_0x636a[53]]= function(_0xd63bxa,_0xd63bx8){return OpenchannelQueue[_0x636a[48]]({where:{id:_0xd63bxa[_0x636a[13]][_0x636a[54]]},individualHooks:true})[_0x636a[12]](function(){return _0xd63bx8[_0x636a[24]](204)})[_0x636a[11]](function(_0xd63bx9){return handleError(_0xd63bx8,_0xd63bx9)})}
\ No newline at end of file
+var _0xcd53=["\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","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x55\x73\x65\x72\x48\x61\x73\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\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","\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","\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","\x6C\x65\x6E\x67\x74\x68","\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","\x68\x61\x6E\x64\x6C\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x4D\x61\x6E\x61\x67\x65\x72","\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","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x20\x51\x75\x65\x75\x65\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x64\x65\x73\x74\x72\x6F\x79","\x65\x72\x72","\x65\x72\x72\x6F\x72","\x71\x75\x65\x75\x65","\x68\x61\x6E\x64\x6C\x65\x46\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0xcd53[0];var _=require(_0xcd53[1]);var Util=require(_0xcd53[2]);var OpenchannelQueue=require(_0xcd53[4])[_0xcd53[3]];var User=require(_0xcd53[4])[_0xcd53[5]];var sequelize=require(_0xcd53[4])[_0xcd53[6]];var UserHasOpenchannelQueue=require(_0xcd53[4])[_0xcd53[7]];function handleError(_0x67f9x8,_0x67f9x9){return _0x67f9x8[_0xcd53[9]](500)[_0xcd53[8]](_0x67f9x9)}exports[_0xcd53[10]]= function(_0x67f9xa,_0x67f9x8){switch(_0x67f9xa[_0xcd53[16]][_0xcd53[23]]){case _0xcd53[16]:return User[_0xcd53[17]](_0x67f9xa[_0xcd53[16]][_0xcd53[15]],{attributes:[_0xcd53[15]]})[_0xcd53[12]](Util[_0xcd53[14]](_0x67f9xa[_0xcd53[13]]))[_0xcd53[12]](function(_0x67f9xb){_0x67f9x8[_0xcd53[9]](200)[_0xcd53[8]](_0x67f9xb)})[_0xcd53[11]](function(_0x67f9x9){return handleError(_0x67f9x8,_0x67f9x9)});default:return OpenchannelQueue[_0xcd53[22]](_0xcd53[21])[_0xcd53[20]](_[_0xcd53[19]](Util[_0xcd53[18]](_0x67f9xa[_0xcd53[13]]),{distinct:true}))[_0xcd53[12]](function(_0x67f9xb){_0x67f9x8[_0xcd53[9]](200)[_0xcd53[8]](_0x67f9xb)})[_0xcd53[11]](function(_0x67f9x9){return handleError(_0x67f9x8,_0x67f9x9)})}};exports[_0xcd53[24]]= function(_0x67f9xa,_0x67f9x8){return OpenchannelQueue[_0xcd53[22]](_0xcd53[21])[_0xcd53[17]](_0x67f9xa[_0xcd53[26]][_0xcd53[15]])[_0xcd53[12]](function(_0x67f9xc){if(!_0x67f9xc){return _0x67f9x8[_0xcd53[25]](404)};return _0x67f9x8[_0xcd53[8]](_0x67f9xc)})[_0xcd53[11]](function(_0x67f9x9){return handleError(_0x67f9x8,_0x67f9x9)})};exports[_0xcd53[27]]= function(_0x67f9xa,_0x67f9x8){return OpenchannelQueue[_0xcd53[17]](_0x67f9xa[_0xcd53[26]][_0xcd53[15]])[_0xcd53[12]](function(_0x67f9xe){if(!_0x67f9xe){return _0x67f9x8[_0xcd53[25]](404)};return _0x67f9xe[_0xcd53[33]]({where:{role:_0xcd53[29]},attributes:[_0xcd53[15],_0xcd53[30],_0xcd53[31],_0xcd53[32]]})})[_0xcd53[12]](function(_0x67f9xd){return _0x67f9x8[_0xcd53[9]](200)[_0xcd53[8]]({rows:_0x67f9xd,count:_0x67f9xd[_0xcd53[28]]})})[_0xcd53[11]](function(_0x67f9x9){return handleError(_0x67f9x8,_0x67f9x9)})};exports[_0xcd53[34]]= function(_0x67f9xa,_0x67f9x8){var _0x67f9xf;return OpenchannelQueue[_0xcd53[34]](_0x67f9xa[_0xcd53[38]])[_0xcd53[12]](function(_0x67f9x10){_0x67f9xf= _0x67f9x10;if(_0x67f9xa[_0xcd53[38]][_0xcd53[37]]){return _0x67f9xf[_0xcd53[40]](_0x67f9xa[_0xcd53[38]][_0xcd53[37]],{penalty:_0x67f9xa[_0xcd53[38]][_0xcd53[39]]|| 0,queue:_0x67f9xf[_0xcd53[30]]})}})[_0xcd53[12]](function(){return _0x67f9x8[_0xcd53[9]](201)[_0xcd53[8]](_0x67f9xf)})[_0xcd53[11]](sequelize.UniqueConstraintError,function(_0x67f9x9){return Util[_0xcd53[36]][_0xcd53[35]](_0x67f9x8,_0x67f9x9)})[_0xcd53[11]](function(_0x67f9x9){return handleError(_0x67f9x8,_0x67f9x9)})};exports[_0xcd53[41]]= function(_0x67f9xa,_0x67f9x8){if(_0x67f9xa[_0xcd53[38]][_0xcd53[15]]){delete _0x67f9xa[_0xcd53[38]][_0xcd53[15]]};return OpenchannelQueue[_0xcd53[17]](_0x67f9xa[_0xcd53[26]][_0xcd53[15]])[_0xcd53[12]](function(_0x67f9xc){if(!_0x67f9xc){return _0x67f9x8[_0xcd53[25]](404)};var _0x67f9x11=_[_0xcd53[19]](_0x67f9xc,_0x67f9xa[_0xcd53[38]]);return _0x67f9x11[_0xcd53[42]]()})[_0xcd53[12]](function(_0x67f9xc){return _0x67f9x8[_0xcd53[9]](200)[_0xcd53[8]](_0x67f9xc)})[_0xcd53[11]](sequelize.UniqueConstraintError,function(_0x67f9x9){return Util[_0xcd53[36]][_0xcd53[35]](_0x67f9x8,_0x67f9x9)})[_0xcd53[11]](function(_0x67f9x9){return handleError(_0x67f9x8,_0x67f9x9)})};exports[_0xcd53[43]]= function(_0x67f9xa,_0x67f9x8,_0x67f9x12){return OpenchannelQueue[_0xcd53[17]](_0x67f9xa[_0xcd53[26]][_0xcd53[15]])[_0xcd53[12]](function(_0x67f9xc){if(!_0x67f9xc){return _0x67f9x8[_0xcd53[25]](404)};var _0x67f9x13=_[_0xcd53[44]](_0x67f9xa[_0xcd53[38]][_0xcd53[37]],function(_0x67f9x14){return {UserId:_0x67f9x14,penalty:_0x67f9xa[_0xcd53[38]][_0xcd53[39]],OpenchannelQueueId:_0x67f9xc[_0xcd53[15]],queue:_0x67f9xc[_0xcd53[30]]}});return UserHasOpenchannelQueue[_0xcd53[45]](_0x67f9x13,{individualHooks:true})})[_0xcd53[12]](function(){return _0x67f9x8[_0xcd53[25]](200)})[_0xcd53[11]](function(_0x67f9x9){return handleError(_0x67f9x8,_0x67f9x9)})};exports[_0xcd53[46]]= function(_0x67f9xa,_0x67f9x8){return OpenchannelQueue[_0xcd53[17]](_0x67f9xa[_0xcd53[26]][_0xcd53[15]])[_0xcd53[12]](function(_0x67f9xc){if(_0x67f9xc){return _0x67f9xc[_0xcd53[47]](_0x67f9xa[_0xcd53[13]][_0xcd53[37]],{individualHooks:true})}else {throw  new Error(_0xcd53[48])}})[_0xcd53[12]](function(){return _0x67f9x8[_0xcd53[25]](202)})[_0xcd53[11]](function(_0x67f9x9){return handleError(_0x67f9x8,_0x67f9x9)})};exports[_0xcd53[49]]= function(_0x67f9xa,_0x67f9x8){var _0x67f9x15;return OpenchannelQueue[_0xcd53[17]](_0x67f9xa[_0xcd53[26]][_0xcd53[15]])[_0xcd53[12]](function(_0x67f9xc){_0x67f9x15= _0x67f9xc;if(!_0x67f9xc){return _0x67f9x8[_0xcd53[25]](404)};return _0x67f9xc[_0xcd53[49]]()})[_0xcd53[12]](function(){return _0x67f9x8[_0xcd53[25]](204)})[_0xcd53[11]](sequelize.ForeignKeyConstraintError,function(_0x67f9x9){return Util[_0xcd53[36]][_0xcd53[53]](_0x67f9x8,_0xcd53[52],_0x67f9x15[_0xcd53[30]],_0x67f9x9)})[_0xcd53[11]](function(_0x67f9x9){console[_0xcd53[51]](_0xcd53[50],_0x67f9x9);return handleError(_0x67f9x8,_0x67f9x9)})};exports[_0xcd53[54]]= function(_0x67f9xa,_0x67f9x8){return OpenchannelQueue[_0xcd53[49]]({where:{id:_0x67f9xa[_0xcd53[13]][_0xcd53[55]]},individualHooks:true})[_0xcd53[12]](function(){return _0x67f9x8[_0xcd53[25]](204)})[_0xcd53[11]](function(_0x67f9x9){return handleError(_0x67f9x8,_0x67f9x9)})}
\ No newline at end of file