Built motion from commit 4e0bcdd.|0.0.104
[motion.git] / server / api / mail_message / mail_message.controller.js
index f934775..861acdb 100644 (file)
@@ -1 +1 @@
-var _0x25ee=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x61\x73\x79\x6E\x63","\x68\x74\x6D\x6C\x2D\x74\x6F\x2D\x74\x65\x78\x74","\x66\x6F\x72\x6D\x69\x64\x61\x62\x6C\x65","\x70\x61\x74\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\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\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x43\x6F\x6E\x74\x61\x63\x74\x45\x6D\x61\x69\x6C","\x43\x6F\x6E\x74\x61\x63\x74","\x55\x73\x65\x72","\x69\x6E\x64\x65\x78","\x63\x72\x65\x61\x74\x65\x64\x41\x74\x20\x44\x45\x53\x43","\x77\x68\x65\x72\x65","\x71\x75\x65\x72\x79","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65","\x75\x73\x65\x72","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x55\x73\x65\x72\x49\x64","\x62\x6F\x64\x79","\x74\x65\x78\x74","\x68\x74\x6D\x6C","\x66\x72\x6F\x6D\x53\x74\x72\x69\x6E\x67","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x6C\x65\x74\x65","\x54\x52\x41\x53\x48","\x62\x75\x6C\x6B\x55\x70\x64\x61\x74\x65"];_0x25ee[0];var _=require(_0x25ee[1]);var async=require(_0x25ee[2]);var htmlToText=require(_0x25ee[3]);var formidable=require(_0x25ee[4]);var path=require(_0x25ee[5]);var config=require(_0x25ee[6]);var sequelize=require(_0x25ee[8])[_0x25ee[7]];var MailMessage=require(_0x25ee[8])[_0x25ee[9]];var MailAttachment=require(_0x25ee[8])[_0x25ee[10]];var MailRoom=require(_0x25ee[8])[_0x25ee[11]];var MailAccount=require(_0x25ee[8])[_0x25ee[12]];var ContactEmail=require(_0x25ee[8])[_0x25ee[13]];var Contact=require(_0x25ee[8])[_0x25ee[14]];var User=require(_0x25ee[8])[_0x25ee[15]];exports[_0x25ee[16]]=function(_0xcc97xf,_0xcc97x10,_0xcc97x11){var _0xcc97x12={order:_0x25ee[17],include:[{all:true,include:[{all:true}]}]};switch(_0xcc97xf[_0x25ee[23]][_0x25ee[22]]){case _0x25ee[20]:_0xcc97x12[_0x25ee[18]]=_0xcc97xf[_0x25ee[19]];break;case _0x25ee[21]:break;default:};return MailMessage[_0x25ee[28]](_0xcc97x12)[_0x25ee[27]](function(_0xcc97x14){return _0xcc97x10[_0x25ee[26]](200)[_0x25ee[25]](_0xcc97x14)})[_0x25ee[24]](function(_0xcc97x13){return handleError(_0xcc97x10,_0xcc97x13,_0xcc97x11)})};exports[_0x25ee[29]]=function(_0xcc97xf,_0xcc97x10,_0xcc97x11){return MailMessage[_0x25ee[36]](_0xcc97xf[_0x25ee[32]][_0x25ee[31]],{include:[{model:MailAttachment},{model:User,attributes:[_0x25ee[31],_0x25ee[33],_0x25ee[34],_0x25ee[35]]}]})[_0x25ee[27]](function(_0xcc97x15){if(!_0xcc97x15){return _0xcc97x10[_0x25ee[30]](404)};return _0xcc97x10[_0x25ee[25]](_0xcc97x15)})[_0x25ee[24]](function(_0xcc97x13){return handleError(_0xcc97x10,_0xcc97x13,_0xcc97x11)})};exports[_0x25ee[37]]=function(_0xcc97xf,_0xcc97x10,_0xcc97x11){_0xcc97xf[_0x25ee[39]][_0x25ee[38]]=_0xcc97xf[_0x25ee[23]][_0x25ee[31]];_0xcc97xf[_0x25ee[39]][_0x25ee[40]]=_0xcc97xf[_0x25ee[39]][_0x25ee[40]]||htmlToText[_0x25ee[42]](_0xcc97xf[_0x25ee[39]][_0x25ee[41]],{wordwrap:false});return MailMessage[_0x25ee[37]](_0xcc97xf[_0x25ee[39]],{include:[{model:MailAttachment}]})[_0x25ee[27]](function(_0xcc97x15){return _0xcc97x10[_0x25ee[26]](201)[_0x25ee[25]](_0xcc97x15)})[_0x25ee[24]](function(_0xcc97x13){return handleError(_0xcc97x10,_0xcc97x13)})};exports[_0x25ee[43]]=function(_0xcc97xf,_0xcc97x10,_0xcc97x11){return MailMessage[_0x25ee[36]](_0xcc97xf[_0x25ee[32]][_0x25ee[31]],{include:[{all:true}]})[_0x25ee[27]](function(_0xcc97x15){if(!_0xcc97x15){return _0xcc97x10[_0x25ee[30]](404)};var _0xcc97x16=_[_0x25ee[44]](_0xcc97x15,_0xcc97xf[_0x25ee[39]]);return _0xcc97x16[_0x25ee[45]]()})[_0x25ee[27]](function(_0xcc97x16){return _0xcc97x10[_0x25ee[26]](200)[_0x25ee[25]](_0xcc97x16)})[_0x25ee[24]](function(_0xcc97x13){return handleError(_0xcc97x10,_0xcc97x13,_0xcc97x11)})};exports[_0x25ee[46]]=function(_0xcc97xf,_0xcc97x10,_0xcc97x11){return MailMessage[_0x25ee[36]](_0xcc97xf[_0x25ee[32]][_0x25ee[31]])[_0x25ee[27]](function(_0xcc97x15){if(!_0xcc97x15){return _0xcc97x10[_0x25ee[30]](404)};return _0xcc97x15[_0x25ee[46]]()})[_0x25ee[27]](function(){return _0xcc97x10[_0x25ee[30]](204)})[_0x25ee[24]](function(_0xcc97x13){return handleError(_0xcc97x10,_0xcc97x13,_0xcc97x11)})};exports[_0x25ee[47]]=function(_0xcc97xf,_0xcc97x10,_0xcc97x11){return MailMessage[_0x25ee[49]]({where:{id:{$in:_0xcc97xf[_0x25ee[39]][_0x25ee[31]]}},attributes:{directory:_0x25ee[48]}})[_0x25ee[27]](function(_0xcc97x15){if(!_0xcc97x15){return _0xcc97x10[_0x25ee[30]](404)};return _0xcc97x15[_0x25ee[46]]()})[_0x25ee[27]](function(){return _0xcc97x10[_0x25ee[30]](204)})[_0x25ee[24]](function(_0xcc97x13){return handleError(_0xcc97x10,_0xcc97x13,_0xcc97x11)})};function handleError(_0xcc97x10,_0xcc97x13,_0xcc97x11){return _0xcc97x10[_0x25ee[26]](500)[_0x25ee[25]](_0xcc97x13)}
\ No newline at end of file
+var _0x3ed5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x61\x73\x79\x6E\x63","\x68\x74\x6D\x6C\x2D\x74\x6F\x2D\x74\x65\x78\x74","\x66\x6F\x72\x6D\x69\x64\x61\x62\x6C\x65","\x70\x61\x74\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\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\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x43\x6F\x6E\x74\x61\x63\x74\x45\x6D\x61\x69\x6C","\x43\x6F\x6E\x74\x61\x63\x74","\x55\x73\x65\x72","\x69\x6E\x64\x65\x78","\x63\x72\x65\x61\x74\x65\x64\x41\x74\x20\x44\x45\x53\x43","\x77\x68\x65\x72\x65","\x71\x75\x65\x72\x79","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65","\x75\x73\x65\x72","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x55\x73\x65\x72\x49\x64","\x62\x6F\x64\x79","\x74\x65\x78\x74","\x68\x74\x6D\x6C","\x66\x72\x6F\x6D\x53\x74\x72\x69\x6E\x67","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x6C\x65\x74\x65","\x54\x52\x41\x53\x48","\x62\x75\x6C\x6B\x55\x70\x64\x61\x74\x65"];_0x3ed5[0];var _=require(_0x3ed5[1]);var async=require(_0x3ed5[2]);var htmlToText=require(_0x3ed5[3]);var formidable=require(_0x3ed5[4]);var path=require(_0x3ed5[5]);var config=require(_0x3ed5[6]);var sequelize=require(_0x3ed5[8])[_0x3ed5[7]];var MailMessage=require(_0x3ed5[8])[_0x3ed5[9]];var MailAttachment=require(_0x3ed5[8])[_0x3ed5[10]];var MailRoom=require(_0x3ed5[8])[_0x3ed5[11]];var MailAccount=require(_0x3ed5[8])[_0x3ed5[12]];var ContactEmail=require(_0x3ed5[8])[_0x3ed5[13]];var Contact=require(_0x3ed5[8])[_0x3ed5[14]];var User=require(_0x3ed5[8])[_0x3ed5[15]];exports[_0x3ed5[16]]=function(_0x4627xf,_0x4627x10,_0x4627x11){var _0x4627x12={order:_0x3ed5[17],include:[{all:true,include:[{all:true}]}]};switch(_0x4627xf[_0x3ed5[23]][_0x3ed5[22]]){case _0x3ed5[20]:_0x4627x12[_0x3ed5[18]]=_0x4627xf[_0x3ed5[19]];break;case _0x3ed5[21]:break;default:};return MailMessage[_0x3ed5[28]](_0x4627x12)[_0x3ed5[27]](function(_0x4627x14){return _0x4627x10[_0x3ed5[26]](200)[_0x3ed5[25]](_0x4627x14)})[_0x3ed5[24]](function(_0x4627x13){return handleError(_0x4627x10,_0x4627x13,_0x4627x11)})};exports[_0x3ed5[29]]=function(_0x4627xf,_0x4627x10,_0x4627x11){return MailMessage[_0x3ed5[36]](_0x4627xf[_0x3ed5[32]][_0x3ed5[31]],{include:[{model:MailAttachment},{model:User,attributes:[_0x3ed5[31],_0x3ed5[33],_0x3ed5[34],_0x3ed5[35]]}]})[_0x3ed5[27]](function(_0x4627x15){if(!_0x4627x15){return _0x4627x10[_0x3ed5[30]](404)};return _0x4627x10[_0x3ed5[25]](_0x4627x15)})[_0x3ed5[24]](function(_0x4627x13){return handleError(_0x4627x10,_0x4627x13,_0x4627x11)})};exports[_0x3ed5[37]]=function(_0x4627xf,_0x4627x10,_0x4627x11){_0x4627xf[_0x3ed5[39]][_0x3ed5[38]]=_0x4627xf[_0x3ed5[23]][_0x3ed5[31]];_0x4627xf[_0x3ed5[39]][_0x3ed5[40]]=_0x4627xf[_0x3ed5[39]][_0x3ed5[40]]||htmlToText[_0x3ed5[42]](_0x4627xf[_0x3ed5[39]][_0x3ed5[41]],{wordwrap:false});return MailMessage[_0x3ed5[37]](_0x4627xf[_0x3ed5[39]],{include:[{model:MailAttachment}]})[_0x3ed5[27]](function(_0x4627x15){return _0x4627x10[_0x3ed5[26]](201)[_0x3ed5[25]](_0x4627x15)})[_0x3ed5[24]](function(_0x4627x13){return handleError(_0x4627x10,_0x4627x13)})};exports[_0x3ed5[43]]=function(_0x4627xf,_0x4627x10,_0x4627x11){return MailMessage[_0x3ed5[36]](_0x4627xf[_0x3ed5[32]][_0x3ed5[31]],{include:[{all:true}]})[_0x3ed5[27]](function(_0x4627x15){if(!_0x4627x15){return _0x4627x10[_0x3ed5[30]](404)};var _0x4627x16=_[_0x3ed5[44]](_0x4627x15,_0x4627xf[_0x3ed5[39]]);return _0x4627x16[_0x3ed5[45]]()})[_0x3ed5[27]](function(_0x4627x16){return _0x4627x10[_0x3ed5[26]](200)[_0x3ed5[25]](_0x4627x16)})[_0x3ed5[24]](function(_0x4627x13){return handleError(_0x4627x10,_0x4627x13,_0x4627x11)})};exports[_0x3ed5[46]]=function(_0x4627xf,_0x4627x10,_0x4627x11){return MailMessage[_0x3ed5[36]](_0x4627xf[_0x3ed5[32]][_0x3ed5[31]])[_0x3ed5[27]](function(_0x4627x15){if(!_0x4627x15){return _0x4627x10[_0x3ed5[30]](404)};return _0x4627x15[_0x3ed5[46]]()})[_0x3ed5[27]](function(){return _0x4627x10[_0x3ed5[30]](204)})[_0x3ed5[24]](function(_0x4627x13){return handleError(_0x4627x10,_0x4627x13,_0x4627x11)})};exports[_0x3ed5[47]]=function(_0x4627xf,_0x4627x10,_0x4627x11){return MailMessage[_0x3ed5[49]]({where:{id:{$in:_0x4627xf[_0x3ed5[39]][_0x3ed5[31]]}},attributes:{directory:_0x3ed5[48]}})[_0x3ed5[27]](function(_0x4627x15){if(!_0x4627x15){return _0x4627x10[_0x3ed5[30]](404)};return _0x4627x15[_0x3ed5[46]]()})[_0x3ed5[27]](function(){return _0x4627x10[_0x3ed5[30]](204)})[_0x3ed5[24]](function(_0x4627x13){return handleError(_0x4627x10,_0x4627x13,_0x4627x11)})};function handleError(_0x4627x10,_0x4627x13,_0x4627x11){return _0x4627x10[_0x3ed5[26]](500)[_0x3ed5[25]](_0x4627x13)}
\ No newline at end of file