6487dfea9991ac9ada92fcf3b3cf6067b8448e66
[motion.git] / server / api / report_mail / report_mail.controller.js
1 var _0xad87=["\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"];_0xad87[0];var _=require(_0xad87[1]);var moment=require(_0xad87[2]);var Report=require(_0xad87[4])[_0xad87[3]];var Room=require(_0xad87[4])[_0xad87[5]];var Status=require(_0xad87[4])[_0xad87[6]];var sequelize=require(_0xad87[4])[_0xad87[7]];var Util=require(_0xad87[8]);exports[_0xad87[9]]= function(_0xb38dx8,_0xb38dx9,_0xb38dxa){var _0xb38dxb={};if(_0xb38dx8[_0xad87[11]][_0xad87[10]]=== _0xad87[12]){_0xb38dxb[_0xad87[13]]= _0xb38dx8[_0xad87[11]][_0xad87[14]]};return Report[_0xad87[21]](Util[_0xad87[20]](_0xb38dx8[_0xad87[19]],_0xb38dxb))[_0xad87[18]](function(_0xb38dxd){_0xb38dx9[_0xad87[17]](200)[_0xad87[16]](_0xb38dxd)})[_0xad87[15]](function(_0xb38dxc){return handleError(_0xb38dx9,_0xb38dxc)})};exports[_0xad87[22]]= function(_0xb38dx8,_0xb38dx9){var _0xb38dxe=_0xb38dx8[_0xad87[26]][_0xad87[25]][_0xad87[24]](_0xad87[23])[1];return Report[_0xad87[33]](_0xb38dx8[_0xad87[26]][_0xad87[32]])[_0xad87[18]](function(_0xb38dxf){if(!_0xb38dxf){return _0xb38dx9[_0xad87[27]](404)};var _0xb38dx10=_[_0xad87[30]](_0xb38dxf,{connectid:_0xb38dx8[_0xad87[26]][_0xad87[25]]});return _0xb38dx10[_0xad87[31]]()})[_0xad87[18]](function(){return Room[_0xad87[29]]({status:_0xad87[28],openReason:_0xad87[12]},{where:{id:_0xb38dxe},user:_0xb38dx8[_0xad87[11]],individualHooks:true})})[_0xad87[18]](function(){return _0xb38dx9[_0xad87[27]](200)})[_0xad87[15]](sequelize.UniqueConstraintError,function(_0xb38dxc){return _0xb38dx9[_0xad87[27]](504)})[_0xad87[15]](function(_0xb38dxc){return handleError(_0xb38dx9,_0xb38dxc)})};exports[_0xad87[34]]= function(_0xb38dx8,_0xb38dx9){var _0xb38dx11;return Report[_0xad87[33]](_0xb38dx8[_0xad87[26]][_0xad87[32]])[_0xad87[18]](function(_0xb38dx12){_0xb38dx11= _0xb38dx12;if(!_0xb38dx11){return _0xb38dx9[_0xad87[27]](404)};var _0xb38dx10=_[_0xad87[30]](_0xb38dx12,{rejectedAt:moment()[_0xad87[40]](_0xad87[39])});return _0xb38dx10[_0xad87[31]]()})[_0xad87[18]](function(){return Status[_0xad87[38]]({status:_0xad87[35],data1:_0xb38dx8[_0xad87[11]][_0xad87[14]],data2:_0xb38dx8[_0xad87[11]][_0xad87[36]],UserId:_0xb38dx8[_0xad87[11]][_0xad87[32]],MailRoomId:_0xb38dx11[_0xad87[37]]})})[_0xad87[18]](function(){return _0xb38dx9[_0xad87[27]](200)})[_0xad87[15]](function(_0xb38dxc){return handleError(_0xb38dx9,_0xb38dxc)})};function handleError(_0xb38dx9,_0xb38dxc){console[_0xad87[41]](_0xb38dxc);return _0xb38dx9[_0xad87[17]](500)[_0xad87[16]](_0xb38dxc)}