Built motion from commit ee60659.|0.0.144
[motion.git] / server / api / report_mail / report_mail.controller.js
index 75d51f0..21b81fc 100644 (file)
@@ -1 +1 @@
-var _0x590c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C","\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","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\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","\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","\x61\x63\x63\x65\x70\x74","\x2E","\x73\x70\x6C\x69\x74","\x75\x6E\x69\x71\x75\x65\x69\x64","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x43\x4C\x4F\x53\x45\x44","\x67\x65\x74\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x73","\x75\x73\x65\x72","\x6D\x61\x69\x6C\x43\x61\x70\x61\x63\x69\x74\x79","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0x590c[0];var _=require(_0x590c[1]);var ReportMail=require(_0x590c[3])[_0x590c[2]];var Agent=require(_0x590c[3])[_0x590c[4]];var sequelize=require(_0x590c[3])[_0x590c[5]];var Util=require(_0x590c[6]);exports[_0x590c[7]]=function(_0xf323x6,_0xf323x7,_0xf323x8){return ReportMail[_0x590c[14]](Util[_0x590c[13]](_0xf323x6[_0x590c[12]]))[_0x590c[11]](function(_0xf323xa){_0xf323x7[_0x590c[10]](200)[_0x590c[9]](_0xf323xa)})[_0x590c[8]](function(_0xf323x9){return handleError(_0xf323x7,_0xf323x9)})};exports[_0x590c[15]]=function(_0xf323x6,_0xf323x7){return ReportMail[_0x590c[19]](_0xf323x6[_0x590c[18]][_0x590c[17]])[_0x590c[11]](function(_0xf323xb){if(!_0xf323xb){return _0xf323x7[_0x590c[16]](404)};return _0xf323x7[_0x590c[9]](_0xf323xb)})[_0x590c[8]](function(_0xf323x9){return handleError(_0xf323x7,_0xf323x9)})};exports[_0x590c[20]]=function(_0xf323x6,_0xf323x7){var _0xf323xc;var _0xf323xd=_0xf323x6[_0x590c[18]][_0x590c[23]][_0x590c[22]](_0x590c[21])[1];return Agent[_0x590c[19]](_0xf323x6[_0x590c[28]][_0x590c[17]],{attributes:[_0x590c[17],_0x590c[29]]})[_0x590c[11]](function(_0xf323x10){_0xf323xc=_0xf323x10;return _0xf323x10[_0x590c[27]]({where:{status:{$ne:_0x590c[26]},id:{$ne:_0xf323xd}},attributes:[_0x590c[17]]})})[_0x590c[11]](function(_0xf323xf){return ReportMail[_0x590c[19]](_0xf323x6[_0x590c[18]][_0x590c[17]])})[_0x590c[11]](function(_0xf323xb){if(!_0xf323xb){return _0xf323x7[_0x590c[16]](404)};var _0xf323xe=_[_0x590c[24]](_0xf323xb,{connectid:_0xf323x6[_0x590c[18]][_0x590c[23]]});return _0xf323xe[_0x590c[25]]()})[_0x590c[11]](function(){return _0xf323x7[_0x590c[16]](200)})[_0x590c[8]](function(_0xf323x9){return handleError(_0xf323x7,_0xf323x9)})};exports[_0x590c[30]]=function(_0xf323x6,_0xf323x7){return ReportMail[_0x590c[30]](_0xf323x6[_0x590c[31]])[_0x590c[11]](function(_0xf323xb){return _0xf323x7[_0x590c[10]](201)[_0x590c[9]](_0xf323xb)})[_0x590c[8]](function(_0xf323x9){return handleError(_0xf323x7,_0xf323x9)})};exports[_0x590c[32]]=function(_0xf323x6,_0xf323x7){if(_0xf323x6[_0x590c[31]][_0x590c[17]]){delete _0xf323x6[_0x590c[31]][_0x590c[17]]};return ReportMail[_0x590c[19]](_0xf323x6[_0x590c[18]][_0x590c[17]])[_0x590c[11]](function(_0xf323xb){if(!_0xf323xb){return _0xf323x7[_0x590c[16]](404)};var _0xf323xe=_[_0x590c[24]](_0xf323xb,_0xf323x6[_0x590c[31]]);return _0xf323xe[_0x590c[25]]()})[_0x590c[11]](function(_0xf323xb){return _0xf323x7[_0x590c[10]](200)[_0x590c[9]](_0xf323xb)})[_0x590c[8]](function(_0xf323x9){return handleError(_0xf323x7,_0xf323x9)})};exports[_0x590c[33]]=function(_0xf323x6,_0xf323x7){return ReportMail[_0x590c[19]](_0xf323x6[_0x590c[18]][_0x590c[17]])[_0x590c[11]](function(_0xf323xb){if(!_0xf323xb){return _0xf323x7[_0x590c[16]](404)};return _0xf323xb[_0x590c[33]]()})[_0x590c[11]](function(){return _0xf323x7[_0x590c[16]](204)})[_0x590c[8]](function(_0xf323x9){return handleError(_0xf323x7,_0xf323x9)})};function handleError(_0xf323x7,_0xf323x9){return _0xf323x7[_0x590c[10]](500)[_0x590c[9]](_0xf323x9)}
\ No newline at end of file
+var _0x36d6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x53\x74\x61\x74\x75\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x72\x6F\x6C\x65","\x75\x73\x65\x72","\x61\x67\x65\x6E\x74","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x6E\x61\x6D\x65","\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","\x61\x63\x63\x65\x70\x74","\x2E","\x73\x70\x6C\x69\x74","\x75\x6E\x69\x71\x75\x65\x69\x64","\x70\x61\x72\x61\x6D\x73","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x4F\x50\x45\x4E","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x69\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x72\x65\x6A\x65\x63\x74","\x52\x45\x4A\x45\x43\x54","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x72\x6F\x6F\x6D\x69\x64","\x63\x72\x65\x61\x74\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x6C\x6F\x67"];_0x36d6[0];var _=require(_0x36d6[1]);var moment=require(_0x36d6[2]);var Report=require(_0x36d6[4])[_0x36d6[3]];var Room=require(_0x36d6[4])[_0x36d6[5]];var Status=require(_0x36d6[4])[_0x36d6[6]];var sequelize=require(_0x36d6[4])[_0x36d6[7]];var Util=require(_0x36d6[8]);exports[_0x36d6[9]]= function(_0x7772x8,_0x7772x9,_0x7772xa){var _0x7772xb={};if(_0x7772x8[_0x36d6[11]][_0x36d6[10]]=== _0x36d6[12]){_0x7772xb[_0x36d6[13]]= _0x7772x8[_0x36d6[11]][_0x36d6[14]]};return Report[_0x36d6[21]](Util[_0x36d6[20]](_0x7772x8[_0x36d6[19]],_0x7772xb))[_0x36d6[18]](function(_0x7772xd){_0x7772x9[_0x36d6[17]](200)[_0x36d6[16]](_0x7772xd)})[_0x36d6[15]](function(_0x7772xc){return handleError(_0x7772x9,_0x7772xc)})};exports[_0x36d6[22]]= function(_0x7772x8,_0x7772x9){var _0x7772xe=_0x7772x8[_0x36d6[26]][_0x36d6[25]][_0x36d6[24]](_0x36d6[23])[1];return Report[_0x36d6[33]](_0x7772x8[_0x36d6[26]][_0x36d6[32]])[_0x36d6[18]](function(_0x7772xf){if(!_0x7772xf){return _0x7772x9[_0x36d6[27]](404)};var _0x7772x10=_[_0x36d6[30]](_0x7772xf,{connectid:_0x7772x8[_0x36d6[26]][_0x36d6[25]]});return _0x7772x10[_0x36d6[31]]()})[_0x36d6[18]](function(){return Room[_0x36d6[29]]({status:_0x36d6[28],openReason:_0x36d6[12]},{where:{id:_0x7772xe},user:_0x7772x8[_0x36d6[11]],individualHooks:true})})[_0x36d6[18]](function(){return _0x7772x9[_0x36d6[27]](200)})[_0x36d6[15]](sequelize.UniqueConstraintError,function(_0x7772xc){return _0x7772x9[_0x36d6[27]](504)})[_0x36d6[15]](function(_0x7772xc){return handleError(_0x7772x9,_0x7772xc)})};exports[_0x36d6[34]]= function(_0x7772x8,_0x7772x9){var _0x7772x11;return Report[_0x36d6[33]](_0x7772x8[_0x36d6[26]][_0x36d6[32]])[_0x36d6[18]](function(_0x7772x12){_0x7772x11= _0x7772x12;if(!_0x7772x11){return _0x7772x9[_0x36d6[27]](404)};var _0x7772x10=_[_0x36d6[30]](_0x7772x12,{rejectedAt:moment()[_0x36d6[40]](_0x36d6[39])});return _0x7772x10[_0x36d6[31]]()})[_0x36d6[18]](function(){return Status[_0x36d6[38]]({status:_0x36d6[35],data1:_0x7772x8[_0x36d6[11]][_0x36d6[14]],data2:_0x7772x8[_0x36d6[11]][_0x36d6[36]],UserId:_0x7772x8[_0x36d6[11]][_0x36d6[32]],MailRoomId:_0x7772x11[_0x36d6[37]]})})[_0x36d6[18]](function(){return _0x7772x9[_0x36d6[27]](200)})[_0x36d6[15]](function(_0x7772xc){return handleError(_0x7772x9,_0x7772xc)})};function handleError(_0x7772x9,_0x7772xc){console[_0x36d6[41]](_0x7772xc);return _0x7772x9[_0x36d6[17]](500)[_0x36d6[16]](_0x7772xc)}
\ No newline at end of file