Built motion from commit 945d615.|1.0.13
[motion.git] / server / api / report_mail_session / report_mail_session.controller.js
index 570536b..4b926e2 100644 (file)
@@ -1 +1 @@
-var _0x5de1=["\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\x53\x65\x73\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x55\x73\x65\x72","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x6F\x6D\x65\x6E\x74","\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\x73\x63\x72\x69\x62\x65","\x69\x64","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x6F\x77\x73","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65","\x74\x69\x6D\x65\x6F\x75\x74","\x6C\x6F\x67","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x6D\x65\x72\x67\x65","\x63\x6F\x75\x6E\x74","\x61\x6C\x6C","\x77\x61\x69\x74\x69\x6E\x67","\x77\x61\x69\x74\x69\x6E\x67\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x66\x69\x6E\x64\x41\x6C\x6C"];_0x5de1[0];var _=require(_0x5de1[1]);var ReportMailSession=require(_0x5de1[3])[_0x5de1[2]];var ReportMailSessionHistory=require(_0x5de1[3])[_0x5de1[5]][_0x5de1[4]];var Util=require(_0x5de1[6]);var User=require(_0x5de1[3])[_0x5de1[7]];var Promise=require(_0x5de1[8]);var moment=require(_0x5de1[9]);exports[_0x5de1[10]]= function(_0xb9bfx8,_0xb9bfx9,_0xb9bfxa){return ReportMailSession[_0x5de1[17]](Util[_0x5de1[16]](_0xb9bfx8[_0x5de1[15]]))[_0x5de1[14]](function(_0xb9bfxc){_0xb9bfx9[_0x5de1[13]](200)[_0x5de1[12]](_0xb9bfxc)})[_0x5de1[11]](function(_0xb9bfxb){return handleError(_0xb9bfx9,_0xb9bfxb)})};exports[_0x5de1[18]]= function(_0xb9bfx8,_0xb9bfx9){return ReportMailSession[_0x5de1[18]]()[_0x5de1[14]](function(_0xb9bfxd){return _0xb9bfx9[_0x5de1[13]](200)[_0x5de1[12]](_0xb9bfxd)})[_0x5de1[11]](function(_0xb9bfxb){return handleError(_0xb9bfx9,_0xb9bfxb)})};function getMailQueues(_0xb9bfxf){return function(){switch(_0xb9bfxf[_0x5de1[29]]){case _0x5de1[26]:return User[_0x5de1[25]](_0xb9bfxf[_0x5de1[19]],{attributes:[_0x5de1[19]]})[_0x5de1[14]](Util[_0x5de1[24]]({},{attributes:[_0x5de1[19]],include:[{raw:true,model:User,attributes:[_0x5de1[19]]}]}))[_0x5de1[14]](function(_0xb9bfx10){var _0xb9bfx11=[];_0xb9bfx10[_0x5de1[23]][_0x5de1[22]](function(_0xb9bfx12){_0xb9bfx11= _[_0x5de1[21]](_0xb9bfx11,_[_0x5de1[20]](_0xb9bfx12.Users,_0x5de1[19]))});return {$or:{queue:_[_0x5de1[20]](_0xb9bfx10[_0x5de1[23]],_0x5de1[19]),memberid:_0xb9bfx11}}});case _0x5de1[28]:return User[_0x5de1[25]](_0xb9bfxf[_0x5de1[19]],{attributes:[_0x5de1[19]]})[_0x5de1[14]](function(_0xb9bfx13){return _0xb9bfx13[_0x5de1[27]]({attributes:[_0x5de1[19]]})})[_0x5de1[14]](function(_0xb9bfx10){return {$or:{queue:_[_0x5de1[20]](_0xb9bfx10,_0x5de1[19]),memberid:_0xb9bfxf[_0x5de1[19]]}}});default:return {}}}}exports[_0x5de1[30]]= function(_0xb9bfx8,_0xb9bfx9){return Promise[_0x5de1[36]]([])[_0x5de1[14]](getMailQueues(_0xb9bfx8[_0x5de1[26]]))[_0x5de1[14]](function(_0xb9bfx15){return ReportMailSession[_0x5de1[35]](Util[_0x5de1[16]](_0xb9bfx8[_0x5de1[15]],_[_0x5de1[34]]({timeout:true,createdAt:{$gte:moment()[_0x5de1[33]](_0x5de1[32])}},_0xb9bfx15)))})[_0x5de1[14]](function(_0xb9bfx14){return _0xb9bfx9[_0x5de1[13]](200)[_0x5de1[12]]({value:_0xb9bfx14})})[_0x5de1[11]](function(_0xb9bfxb){console[_0x5de1[31]](_0xb9bfxb);return handleError(_0xb9bfx9,_0xb9bfxb)})};exports[_0x5de1[37]]= function(_0xb9bfx8,_0xb9bfx9){return Promise[_0x5de1[36]]([])[_0x5de1[14]](getMailQueues(_0xb9bfx8[_0x5de1[26]]))[_0x5de1[14]](function(_0xb9bfx15){return ReportMailSession[_0x5de1[35]](Util[_0x5de1[16]](_0xb9bfx8[_0x5de1[15]],_[_0x5de1[34]]({leaveAt:null,createdAt:{$gte:moment()[_0x5de1[33]](_0x5de1[32])}},_0xb9bfx15)))})[_0x5de1[14]](function(_0xb9bfx14){return _0xb9bfx9[_0x5de1[13]](200)[_0x5de1[12]]({value:_0xb9bfx14})})[_0x5de1[11]](function(_0xb9bfxb){console[_0x5de1[31]](_0xb9bfxb);return handleError(_0xb9bfx9,_0xb9bfxb)})};exports[_0x5de1[38]]= function(_0xb9bfx8,_0xb9bfx9){return Promise[_0x5de1[36]]([])[_0x5de1[14]](getMailQueues(_0xb9bfx8[_0x5de1[26]]))[_0x5de1[14]](function(_0xb9bfx15){return ReportMailSession[_0x5de1[39]](Util[_0x5de1[16]](_0xb9bfx8[_0x5de1[15]],_[_0x5de1[34]]({leaveAt:null},_0xb9bfx15)))})[_0x5de1[14]](function(_0xb9bfx14){return _0xb9bfx9[_0x5de1[13]](200)[_0x5de1[12]]({rows:_0xb9bfx14})})[_0x5de1[11]](function(_0xb9bfxb){console[_0x5de1[31]](_0xb9bfxb);return handleError(_0xb9bfx9,_0xb9bfxb)})};function handleError(_0xb9bfx9,_0xb9bfxb){return _0xb9bfx9[_0x5de1[13]](500)[_0x5de1[12]](_0xb9bfxb)}
\ No newline at end of file
+var _0x951e=["\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\x53\x65\x73\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x55\x73\x65\x72","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x6F\x6D\x65\x6E\x74","\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\x73\x63\x72\x69\x62\x65","\x69\x64","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x6F\x77\x73","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65","\x74\x69\x6D\x65\x6F\x75\x74","\x6C\x6F\x67","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x6D\x65\x72\x67\x65","\x63\x6F\x75\x6E\x74","\x61\x6C\x6C","\x77\x61\x69\x74\x69\x6E\x67","\x77\x61\x69\x74\x69\x6E\x67\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x66\x69\x6E\x64\x41\x6C\x6C"];_0x951e[0];var _=require(_0x951e[1]);var ReportMailSession=require(_0x951e[3])[_0x951e[2]];var ReportMailSessionHistory=require(_0x951e[3])[_0x951e[5]][_0x951e[4]];var Util=require(_0x951e[6]);var User=require(_0x951e[3])[_0x951e[7]];var Promise=require(_0x951e[8]);var moment=require(_0x951e[9]);exports[_0x951e[10]]= function(_0xace5x8,_0xace5x9,_0xace5xa){return ReportMailSession[_0x951e[17]](Util[_0x951e[16]](_0xace5x8[_0x951e[15]]))[_0x951e[14]](function(_0xace5xc){_0xace5x9[_0x951e[13]](200)[_0x951e[12]](_0xace5xc)})[_0x951e[11]](function(_0xace5xb){return handleError(_0xace5x9,_0xace5xb)})};exports[_0x951e[18]]= function(_0xace5x8,_0xace5x9){return ReportMailSession[_0x951e[18]]()[_0x951e[14]](function(_0xace5xd){return _0xace5x9[_0x951e[13]](200)[_0x951e[12]](_0xace5xd)})[_0x951e[11]](function(_0xace5xb){return handleError(_0xace5x9,_0xace5xb)})};function getMailQueues(_0xace5xf){return function(){switch(_0xace5xf[_0x951e[29]]){case _0x951e[26]:return User[_0x951e[25]](_0xace5xf[_0x951e[19]],{attributes:[_0x951e[19]]})[_0x951e[14]](Util[_0x951e[24]]({},{attributes:[_0x951e[19]],include:[{raw:true,model:User,attributes:[_0x951e[19]]}]}))[_0x951e[14]](function(_0xace5x10){var _0xace5x11=[];_0xace5x10[_0x951e[23]][_0x951e[22]](function(_0xace5x12){_0xace5x11= _[_0x951e[21]](_0xace5x11,_[_0x951e[20]](_0xace5x12.Users,_0x951e[19]))});return {$or:{queue:_[_0x951e[20]](_0xace5x10[_0x951e[23]],_0x951e[19]),memberid:_0xace5x11}}});case _0x951e[28]:return User[_0x951e[25]](_0xace5xf[_0x951e[19]],{attributes:[_0x951e[19]]})[_0x951e[14]](function(_0xace5x13){return _0xace5x13[_0x951e[27]]({attributes:[_0x951e[19]]})})[_0x951e[14]](function(_0xace5x10){return {$or:{queue:_[_0x951e[20]](_0xace5x10,_0x951e[19]),memberid:_0xace5xf[_0x951e[19]]}}});default:return {}}}}exports[_0x951e[30]]= function(_0xace5x8,_0xace5x9){return Promise[_0x951e[36]]([])[_0x951e[14]](getMailQueues(_0xace5x8[_0x951e[26]]))[_0x951e[14]](function(_0xace5x15){return ReportMailSession[_0x951e[35]](Util[_0x951e[16]](_0xace5x8[_0x951e[15]],_[_0x951e[34]]({timeout:true,createdAt:{$gte:moment()[_0x951e[33]](_0x951e[32])}},_0xace5x15)))})[_0x951e[14]](function(_0xace5x14){return _0xace5x9[_0x951e[13]](200)[_0x951e[12]]({value:_0xace5x14})})[_0x951e[11]](function(_0xace5xb){console[_0x951e[31]](_0xace5xb);return handleError(_0xace5x9,_0xace5xb)})};exports[_0x951e[37]]= function(_0xace5x8,_0xace5x9){return Promise[_0x951e[36]]([])[_0x951e[14]](getMailQueues(_0xace5x8[_0x951e[26]]))[_0x951e[14]](function(_0xace5x15){return ReportMailSession[_0x951e[35]](Util[_0x951e[16]](_0xace5x8[_0x951e[15]],_[_0x951e[34]]({leaveAt:null,createdAt:{$gte:moment()[_0x951e[33]](_0x951e[32])}},_0xace5x15)))})[_0x951e[14]](function(_0xace5x14){return _0xace5x9[_0x951e[13]](200)[_0x951e[12]]({value:_0xace5x14})})[_0x951e[11]](function(_0xace5xb){console[_0x951e[31]](_0xace5xb);return handleError(_0xace5x9,_0xace5xb)})};exports[_0x951e[38]]= function(_0xace5x8,_0xace5x9){return Promise[_0x951e[36]]([])[_0x951e[14]](getMailQueues(_0xace5x8[_0x951e[26]]))[_0x951e[14]](function(_0xace5x15){return ReportMailSession[_0x951e[39]](Util[_0x951e[16]](_0xace5x8[_0x951e[15]],_[_0x951e[34]]({leaveAt:null},_0xace5x15)))})[_0x951e[14]](function(_0xace5x14){return _0xace5x9[_0x951e[13]](200)[_0x951e[12]]({rows:_0xace5x14})})[_0x951e[11]](function(_0xace5xb){console[_0x951e[31]](_0xace5xb);return handleError(_0xace5x9,_0xace5xb)})};function handleError(_0xace5x9,_0xace5xb){return _0xace5x9[_0x951e[13]](500)[_0x951e[12]](_0xace5xb)}
\ No newline at end of file