Built motion from commit 14c9826.|0.0.145
[motion.git] / server / api / mail_queue / mail_queue.controller.js
index 57a733f..0009490 100644 (file)
@@ -1 +1 @@
-var _0x8a76=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\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","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\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","\x61\x64\x64\x55\x73\x65\x72\x73","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\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","\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","\x72\x65\x6D\x6F\x76\x65\x55\x73\x65\x72"];_0x8a76[0];var _=require(_0x8a76[1]);var util=require(_0x8a76[2]);var Util=require(_0x8a76[3]);var MailQueue=require(_0x8a76[5])[_0x8a76[4]];exports[_0x8a76[6]]=function(_0xc09fx5,_0xc09fx6){return MailQueue[_0x8a76[15]](_0x8a76[14])[_0x8a76[13]](Util[_0x8a76[12]](_0xc09fx5[_0x8a76[11]]))[_0x8a76[10]](function(_0xc09fx8){_0xc09fx6[_0x8a76[9]](200)[_0x8a76[8]](_0xc09fx8)})[_0x8a76[7]](function(_0xc09fx7){return handleError(_0xc09fx6,_0xc09fx7)})};exports[_0x8a76[16]]=function(_0xc09fx5,_0xc09fx6){return MailQueue[_0x8a76[15]](_0x8a76[14])[_0x8a76[20]](_0xc09fx5[_0x8a76[19]][_0x8a76[18]])[_0x8a76[10]](function(_0xc09fx9){if(!_0xc09fx9){return _0xc09fx6[_0x8a76[17]](404)};return _0xc09fx6[_0x8a76[8]](_0xc09fx9)})[_0x8a76[7]](function(_0xc09fx7){return handleError(_0xc09fx6,_0xc09fx7)})};exports[_0x8a76[21]]=function(_0xc09fx5,_0xc09fx6){return MailQueue[_0x8a76[21]](_0xc09fx5[_0x8a76[22]])[_0x8a76[10]](function(_0xc09fx9){return _0xc09fx6[_0x8a76[9]](201)[_0x8a76[8]](_0xc09fx9)})[_0x8a76[7]](function(_0xc09fx7){return handleError(_0xc09fx6,_0xc09fx7)})};exports[_0x8a76[23]]=function(_0xc09fx5,_0xc09fx6){if(_0xc09fx5[_0x8a76[22]][_0x8a76[18]]){delete _0xc09fx5[_0x8a76[22]][_0x8a76[18]]};return MailQueue[_0x8a76[20]](_0xc09fx5[_0x8a76[19]][_0x8a76[18]])[_0x8a76[10]](function(_0xc09fx9){if(!_0xc09fx9){return _0xc09fx6[_0x8a76[17]](404)};var _0xc09fxa=_[_0x8a76[24]](_0xc09fx9,_0xc09fx5[_0x8a76[22]]);return _0xc09fxa[_0x8a76[25]]()})[_0x8a76[10]](function(_0xc09fx9){return _0xc09fx6[_0x8a76[9]](200)[_0x8a76[8]](_0xc09fx9)})[_0x8a76[7]](function(_0xc09fx7){return handleError(_0xc09fx6,_0xc09fx7)})};exports[_0x8a76[26]]=function(_0xc09fx5,_0xc09fx6,_0xc09fxb){return MailQueue[_0x8a76[20]](_0xc09fx5[_0x8a76[19]][_0x8a76[18]])[_0x8a76[10]](function(_0xc09fx9){if(_0xc09fx9){return _0xc09fx9[_0x8a76[28]](_0xc09fx5[_0x8a76[22]][_0x8a76[27]],{individualHooks:true})}else {throw  new Error(_0x8a76[29])}})[_0x8a76[10]](function(){return _0xc09fx6[_0x8a76[17]](200)})[_0x8a76[7]](function(_0xc09fx7){return handleError(_0xc09fx6,_0xc09fx7)})};exports[_0x8a76[30]]=function(_0xc09fx5,_0xc09fx6){return MailQueue[_0x8a76[20]](_0xc09fx5[_0x8a76[19]][_0x8a76[18]])[_0x8a76[10]](function(_0xc09fx9){if(_0xc09fx9){return _0xc09fx9[_0x8a76[31]](_0xc09fx5[_0x8a76[22]][_0x8a76[27]],{individualHooks:true})}else {throw  new Error(_0x8a76[29])}})[_0x8a76[10]](function(){return _0xc09fx6[_0x8a76[17]](200)})[_0x8a76[7]](function(_0xc09fx7){return handleError(_0xc09fx6,_0xc09fx7)})};exports[_0x8a76[32]]=function(_0xc09fx5,_0xc09fx6){return MailQueue[_0x8a76[20]](_0xc09fx5[_0x8a76[19]][_0x8a76[18]])[_0x8a76[10]](function(_0xc09fx9){if(!_0xc09fx9){return _0xc09fx6[_0x8a76[17]](404)};return _0xc09fx9[_0x8a76[32]]()})[_0x8a76[10]](function(){return _0xc09fx6[_0x8a76[17]](204)})[_0x8a76[7]](function(_0xc09fx7){return handleError(_0xc09fx6,_0xc09fx7)})};exports[_0x8a76[33]]=function(_0xc09fx5,_0xc09fx6){return MailQueue[_0x8a76[32]]({where:{id:_0xc09fx5[_0x8a76[11]][_0x8a76[18]]},individualHooks:true})[_0x8a76[10]](function(){return _0xc09fx6[_0x8a76[17]](204)})[_0x8a76[7]](function(_0xc09fx7){return handleError(_0xc09fx6,_0xc09fx7)})};exports[_0x8a76[34]]=function(_0xc09fx5,_0xc09fx6){return MailQueue[_0x8a76[20]](_0xc09fx5[_0x8a76[19]][_0x8a76[18]])[_0x8a76[10]](function(_0xc09fxd){if(!_0xc09fxd){return _0xc09fx6[_0x8a76[17]](404)};return _0xc09fxd[_0x8a76[39]]({where:{role:_0x8a76[35]},attributes:[_0x8a76[18],_0x8a76[36],_0x8a76[37],_0x8a76[38]]})})[_0x8a76[10]](function(_0xc09fxc){return _0xc09fx6[_0x8a76[9]](200)[_0x8a76[8]](_0xc09fxc)})[_0x8a76[7]](function(_0xc09fx7){return handleError(_0xc09fx6,_0xc09fx7)})};exports[_0x8a76[30]]=function(_0xc09fx5,_0xc09fx6,_0xc09fxb){return MailQueue[_0x8a76[20]](_0xc09fx5[_0x8a76[19]][_0x8a76[18]])[_0x8a76[10]](function(_0xc09fxd){if(!_0xc09fxd){return _0xc09fx6[_0x8a76[17]](404)};return _0xc09fxd[_0x8a76[40]](_0xc09fx5[_0x8a76[11]][_0x8a76[27]])})[_0x8a76[10]](function(){return _0xc09fx6[_0x8a76[17]](202)})[_0x8a76[7]](function(_0xc09fx7){return _0xc09fxb(_0xc09fx7)})};function handleError(_0xc09fx6,_0xc09fx7){return _0xc09fx6[_0x8a76[9]](500)[_0x8a76[8]](_0xc09fx7)}
\ No newline at end of file
+var _0xa5da=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x55\x73\x65\x72","\x55\x73\x65\x72\x48\x61\x73\x4D\x61\x69\x6C\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\x4D\x61\x69\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","\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","\x6E\x61\x6D\x65","\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","\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","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x6C\x65\x6E\x67\x74\x68","\x61\x67\x65\x6E\x74","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x67\x65\x74\x55\x73\x65\x72\x73"];_0xa5da[0];var _=require(_0xa5da[1]);var util=require(_0xa5da[2]);var Util=require(_0xa5da[3]);var sequelize=require(_0xa5da[5])[_0xa5da[4]];var MailQueue=require(_0xa5da[5])[_0xa5da[6]];var User=require(_0xa5da[5])[_0xa5da[7]];var UserHasMailQueue=require(_0xa5da[5])[_0xa5da[8]];exports[_0xa5da[9]]= function(_0x745fx8,_0x745fx9){switch(_0x745fx8[_0xa5da[17]][_0xa5da[24]]){case _0xa5da[17]:return User[_0xa5da[18]](_0x745fx8[_0xa5da[17]][_0xa5da[16]],{attributes:[_0xa5da[16]]})[_0xa5da[13]](Util[_0xa5da[15]](_0x745fx8[_0xa5da[14]]))[_0xa5da[13]](function(_0x745fxb){_0x745fx9[_0xa5da[12]](200)[_0xa5da[11]](_0x745fxb)})[_0xa5da[10]](function(_0x745fxa){return handleError(_0x745fx9,_0x745fxa)});default:return MailQueue[_0xa5da[23]](_0xa5da[22])[_0xa5da[21]](_[_0xa5da[20]](Util[_0xa5da[19]](_0x745fx8[_0xa5da[14]]),{distinct:true}))[_0xa5da[13]](function(_0x745fxb){_0x745fx9[_0xa5da[12]](200)[_0xa5da[11]](_0x745fxb)})[_0xa5da[10]](function(_0x745fxa){return handleError(_0x745fx9,_0x745fxa)})}};exports[_0xa5da[25]]= function(_0x745fx8,_0x745fx9){return MailQueue[_0xa5da[23]](_0xa5da[22])[_0xa5da[18]](_0x745fx8[_0xa5da[27]][_0xa5da[16]])[_0xa5da[13]](function(_0x745fxc){if(!_0x745fxc){return _0x745fx9[_0xa5da[26]](404)};return _0x745fx9[_0xa5da[11]](_0x745fxc)})[_0xa5da[10]](function(_0x745fxa){return handleError(_0x745fx9,_0x745fxa)})};exports[_0xa5da[28]]= function(_0x745fx8,_0x745fx9){var _0x745fxd;return MailQueue[_0xa5da[28]](_0x745fx8[_0xa5da[32]])[_0xa5da[13]](function(_0x745fxc){_0x745fxd= _0x745fxc;if(_0x745fx8[_0xa5da[32]][_0xa5da[31]]){return _0x745fxd[_0xa5da[35]](_0x745fx8[_0xa5da[32]][_0xa5da[31]],{penalty:_0x745fx8[_0xa5da[32]][_0xa5da[33]]|| 0,queue:_0x745fxd[_0xa5da[34]]})}})[_0xa5da[13]](function(){return _0x745fx9[_0xa5da[12]](201)[_0xa5da[11]](_0x745fxd)})[_0xa5da[10]](sequelize.UniqueConstraintError,function(_0x745fxa){return Util[_0xa5da[30]][_0xa5da[29]](_0x745fx9,_0x745fxa)})[_0xa5da[10]](function(_0x745fxa){return handleError(_0x745fx9,_0x745fxa)})};exports[_0xa5da[36]]= function(_0x745fx8,_0x745fx9){if(_0x745fx8[_0xa5da[32]][_0xa5da[16]]){delete _0x745fx8[_0xa5da[32]][_0xa5da[16]]};return MailQueue[_0xa5da[18]](_0x745fx8[_0xa5da[27]][_0xa5da[16]])[_0xa5da[13]](function(_0x745fxc){if(!_0x745fxc){return _0x745fx9[_0xa5da[26]](404)};var _0x745fxe=_[_0xa5da[20]](_0x745fxc,_0x745fx8[_0xa5da[32]]);return _0x745fxe[_0xa5da[37]]()})[_0xa5da[13]](function(_0x745fxc){return _0x745fx9[_0xa5da[12]](200)[_0xa5da[11]](_0x745fxc)})[_0xa5da[10]](sequelize.UniqueConstraintError,function(_0x745fxa){return Util[_0xa5da[30]][_0xa5da[29]](_0x745fx9,_0x745fxa)})[_0xa5da[10]](function(_0x745fxa){return handleError(_0x745fx9,_0x745fxa)})};exports[_0xa5da[38]]= function(_0x745fx8,_0x745fx9,_0x745fxf){return MailQueue[_0xa5da[18]](_0x745fx8[_0xa5da[27]][_0xa5da[16]])[_0xa5da[13]](function(_0x745fxc){if(!_0x745fxc){return _0x745fx9[_0xa5da[26]](404)};var _0x745fx10=_[_0xa5da[39]](_0x745fx8[_0xa5da[32]][_0xa5da[31]],function(_0x745fx11){return {UserId:_0x745fx11,penalty:_0x745fx8[_0xa5da[32]][_0xa5da[33]],MailQueueId:_0x745fxc[_0xa5da[16]],queue:_0x745fxc[_0xa5da[34]]}});return UserHasMailQueue[_0xa5da[40]](_0x745fx10,{individualHooks:true})})[_0xa5da[13]](function(){return _0x745fx9[_0xa5da[26]](200)})[_0xa5da[10]](function(_0x745fxa){return handleError(_0x745fx9,_0x745fxa)})};exports[_0xa5da[41]]= function(_0x745fx8,_0x745fx9){return MailQueue[_0xa5da[18]](_0x745fx8[_0xa5da[27]][_0xa5da[16]])[_0xa5da[13]](function(_0x745fx12){if(!_0x745fx12){return _0x745fx9[_0xa5da[26]](404)};return _0x745fx12[_0xa5da[42]](_0x745fx8[_0xa5da[14]][_0xa5da[31]],{individualHooks:true})})[_0xa5da[13]](function(){return _0x745fx9[_0xa5da[26]](200)})[_0xa5da[10]](function(_0x745fxa){return handleError(_0x745fx9,_0x745fxa)})};exports[_0xa5da[43]]= function(_0x745fx8,_0x745fx9){var _0x745fxd;return MailQueue[_0xa5da[18]](_0x745fx8[_0xa5da[27]][_0xa5da[16]])[_0xa5da[13]](function(_0x745fxc){_0x745fxd= _0x745fxc;if(!_0x745fxc){return _0x745fx9[_0xa5da[26]](404)};return _0x745fxc[_0xa5da[43]]()})[_0xa5da[13]](function(){return _0x745fx9[_0xa5da[26]](204)})[_0xa5da[10]](sequelize.ForeignKeyConstraintError,function(_0x745fxa){return Util[_0xa5da[30]][_0xa5da[47]](_0x745fx9,_0xa5da[46],_0x745fxd[_0xa5da[34]],_0x745fxa)})[_0xa5da[10]](function(_0x745fxa){console[_0xa5da[45]](_0xa5da[44],_0x745fxa);return handleError(_0x745fx9,_0x745fxa)})};exports[_0xa5da[48]]= function(_0x745fx8,_0x745fx9){return MailQueue[_0xa5da[43]]({where:{id:_0x745fx8[_0xa5da[14]][_0xa5da[49]]},individualHooks:true})[_0xa5da[13]](function(){return _0x745fx9[_0xa5da[26]](204)})[_0xa5da[10]](function(_0x745fxa){return handleError(_0x745fx9,_0x745fxa)})};exports[_0xa5da[50]]= function(_0x745fx8,_0x745fx9){return MailQueue[_0xa5da[18]](_0x745fx8[_0xa5da[27]][_0xa5da[16]])[_0xa5da[13]](function(_0x745fx12){if(!_0x745fx12){return _0x745fx9[_0xa5da[26]](404)};return _0x745fx12[_0xa5da[55]]({where:{role:_0xa5da[52]},attributes:[_0xa5da[16],_0xa5da[34],_0xa5da[53],_0xa5da[54]]})})[_0xa5da[13]](function(_0x745fx13){return _0x745fx9[_0xa5da[12]](200)[_0xa5da[11]]({rows:_0x745fx13,count:_0x745fx13[_0xa5da[51]]})})[_0xa5da[10]](function(_0x745fxa){return handleError(_0x745fx9,_0x745fxa)})};function handleError(_0x745fx9,_0x745fxa){return _0x745fx9[_0xa5da[12]](500)[_0xa5da[11]](_0x745fxa)}
\ No newline at end of file