Built motion from commit 14c9826.|0.0.145
[motion.git] / server / api / mail_queue / mail_queue.controller.js
index 64734e7..0009490 100644 (file)
@@ -1 +1 @@
-var _0x4aba=["\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"];_0x4aba[0];var _=require(_0x4aba[1]);var util=require(_0x4aba[2]);var Util=require(_0x4aba[3]);var MailQueue=require(_0x4aba[5])[_0x4aba[4]];exports[_0x4aba[6]]=function(_0xf3afx5,_0xf3afx6){return MailQueue[_0x4aba[15]](_0x4aba[14])[_0x4aba[13]](Util[_0x4aba[12]](_0xf3afx5[_0x4aba[11]]))[_0x4aba[10]](function(_0xf3afx8){_0xf3afx6[_0x4aba[9]](200)[_0x4aba[8]](_0xf3afx8)})[_0x4aba[7]](function(_0xf3afx7){return handleError(_0xf3afx6,_0xf3afx7)})};exports[_0x4aba[16]]=function(_0xf3afx5,_0xf3afx6){return MailQueue[_0x4aba[15]](_0x4aba[14])[_0x4aba[20]](_0xf3afx5[_0x4aba[19]][_0x4aba[18]])[_0x4aba[10]](function(_0xf3afx9){if(!_0xf3afx9){return _0xf3afx6[_0x4aba[17]](404)};return _0xf3afx6[_0x4aba[8]](_0xf3afx9)})[_0x4aba[7]](function(_0xf3afx7){return handleError(_0xf3afx6,_0xf3afx7)})};exports[_0x4aba[21]]=function(_0xf3afx5,_0xf3afx6){return MailQueue[_0x4aba[21]](_0xf3afx5[_0x4aba[22]])[_0x4aba[10]](function(_0xf3afx9){return _0xf3afx6[_0x4aba[9]](201)[_0x4aba[8]](_0xf3afx9)})[_0x4aba[7]](function(_0xf3afx7){return handleError(_0xf3afx6,_0xf3afx7)})};exports[_0x4aba[23]]=function(_0xf3afx5,_0xf3afx6){if(_0xf3afx5[_0x4aba[22]][_0x4aba[18]]){delete _0xf3afx5[_0x4aba[22]][_0x4aba[18]]};return MailQueue[_0x4aba[20]](_0xf3afx5[_0x4aba[19]][_0x4aba[18]])[_0x4aba[10]](function(_0xf3afx9){if(!_0xf3afx9){return _0xf3afx6[_0x4aba[17]](404)};var _0xf3afxa=_[_0x4aba[24]](_0xf3afx9,_0xf3afx5[_0x4aba[22]]);return _0xf3afxa[_0x4aba[25]]()})[_0x4aba[10]](function(_0xf3afx9){return _0xf3afx6[_0x4aba[9]](200)[_0x4aba[8]](_0xf3afx9)})[_0x4aba[7]](function(_0xf3afx7){return handleError(_0xf3afx6,_0xf3afx7)})};exports[_0x4aba[26]]=function(_0xf3afx5,_0xf3afx6,_0xf3afxb){return MailQueue[_0x4aba[20]](_0xf3afx5[_0x4aba[19]][_0x4aba[18]])[_0x4aba[10]](function(_0xf3afx9){if(_0xf3afx9){return _0xf3afx9[_0x4aba[28]](_0xf3afx5[_0x4aba[22]][_0x4aba[27]],{individualHooks:true})}else {throw  new Error(_0x4aba[29])}})[_0x4aba[10]](function(){return _0xf3afx6[_0x4aba[17]](200)})[_0x4aba[7]](function(_0xf3afx7){return handleError(_0xf3afx6,_0xf3afx7)})};exports[_0x4aba[30]]=function(_0xf3afx5,_0xf3afx6){return MailQueue[_0x4aba[20]](_0xf3afx5[_0x4aba[19]][_0x4aba[18]])[_0x4aba[10]](function(_0xf3afx9){if(_0xf3afx9){return _0xf3afx9[_0x4aba[31]](_0xf3afx5[_0x4aba[22]][_0x4aba[27]],{individualHooks:true})}else {throw  new Error(_0x4aba[29])}})[_0x4aba[10]](function(){return _0xf3afx6[_0x4aba[17]](200)})[_0x4aba[7]](function(_0xf3afx7){return handleError(_0xf3afx6,_0xf3afx7)})};exports[_0x4aba[32]]=function(_0xf3afx5,_0xf3afx6){return MailQueue[_0x4aba[20]](_0xf3afx5[_0x4aba[19]][_0x4aba[18]])[_0x4aba[10]](function(_0xf3afx9){if(!_0xf3afx9){return _0xf3afx6[_0x4aba[17]](404)};return _0xf3afx9[_0x4aba[32]]()})[_0x4aba[10]](function(){return _0xf3afx6[_0x4aba[17]](204)})[_0x4aba[7]](function(_0xf3afx7){return handleError(_0xf3afx6,_0xf3afx7)})};exports[_0x4aba[33]]=function(_0xf3afx5,_0xf3afx6){return MailQueue[_0x4aba[32]]({where:{id:_0xf3afx5[_0x4aba[11]][_0x4aba[18]]},individualHooks:true})[_0x4aba[10]](function(){return _0xf3afx6[_0x4aba[17]](204)})[_0x4aba[7]](function(_0xf3afx7){return handleError(_0xf3afx6,_0xf3afx7)})};exports[_0x4aba[34]]=function(_0xf3afx5,_0xf3afx6){return MailQueue[_0x4aba[20]](_0xf3afx5[_0x4aba[19]][_0x4aba[18]])[_0x4aba[10]](function(_0xf3afxd){if(!_0xf3afxd){return _0xf3afx6[_0x4aba[17]](404)};return _0xf3afxd[_0x4aba[39]]({where:{role:_0x4aba[35]},attributes:[_0x4aba[18],_0x4aba[36],_0x4aba[37],_0x4aba[38]]})})[_0x4aba[10]](function(_0xf3afxc){return _0xf3afx6[_0x4aba[9]](200)[_0x4aba[8]](_0xf3afxc)})[_0x4aba[7]](function(_0xf3afx7){return handleError(_0xf3afx6,_0xf3afx7)})};exports[_0x4aba[30]]=function(_0xf3afx5,_0xf3afx6,_0xf3afxb){return MailQueue[_0x4aba[20]](_0xf3afx5[_0x4aba[19]][_0x4aba[18]])[_0x4aba[10]](function(_0xf3afxd){if(!_0xf3afxd){return _0xf3afx6[_0x4aba[17]](404)};return _0xf3afxd[_0x4aba[40]](_0xf3afx5[_0x4aba[11]][_0x4aba[27]])})[_0x4aba[10]](function(){return _0xf3afx6[_0x4aba[17]](202)})[_0x4aba[7]](function(_0xf3afx7){return _0xf3afxb(_0xf3afx7)})};function handleError(_0xf3afx6,_0xf3afx7){return _0xf3afx6[_0x4aba[9]](500)[_0x4aba[8]](_0xf3afx7)}
\ 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