Built motion from commit 3537c3f88.|1.0.22
[motion.git] / server / api / report_mail_session / report_mail_session.controller.js
index 548008c..773a450 100644 (file)
@@ -1 +1 @@
-var _0xe6ba=["\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","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\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\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","\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","\x67\x65\x74\x44\x61\x73\x68\x62\x6F\x61\x72\x64\x56\x61\x6C\x75\x65\x73","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72"];_0xe6ba[0];var _=require(_0xe6ba[1]);var ReportMailSession=require(_0xe6ba[3])[_0xe6ba[2]];var ReportMailSessionHistory=require(_0xe6ba[3])[_0xe6ba[5]][_0xe6ba[4]];var Util=require(_0xe6ba[6]);var User=require(_0xe6ba[3])[_0xe6ba[7]];var Promise=require(_0xe6ba[8]);var moment=require(_0xe6ba[9]);var logger=require(_0xe6ba[11])(_0xe6ba[10]);exports[_0xe6ba[12]]= function(_0xa3dex9,_0xa3dexa,_0xa3dexb){return ReportMailSession[_0xe6ba[19]](Util[_0xe6ba[18]](_0xa3dex9[_0xe6ba[17]]))[_0xe6ba[16]](function(_0xa3dexd){_0xa3dexa[_0xe6ba[15]](200)[_0xe6ba[14]](_0xa3dexd)})[_0xe6ba[13]](function(_0xa3dexc){return handleError(_0xa3dexa,_0xa3dexc)})};exports[_0xe6ba[20]]= function(_0xa3dex9,_0xa3dexa){return ReportMailSession[_0xe6ba[20]]()[_0xe6ba[16]](function(_0xa3dexe){return _0xa3dexa[_0xe6ba[15]](200)[_0xe6ba[14]](_0xa3dexe)})[_0xe6ba[13]](function(_0xa3dexc){return handleError(_0xa3dexa,_0xa3dexc)})};function getMailQueues(_0xa3dex10){return function(){switch(_0xa3dex10[_0xe6ba[31]]){case _0xe6ba[28]:return User[_0xe6ba[27]](_0xa3dex10[_0xe6ba[21]],{attributes:[_0xe6ba[21]]})[_0xe6ba[16]](Util[_0xe6ba[26]]({},{attributes:[_0xe6ba[21]],include:[{raw:true,model:User,attributes:[_0xe6ba[21]]}]}))[_0xe6ba[16]](function(_0xa3dex11){var _0xa3dex12=[];_0xa3dex11[_0xe6ba[25]][_0xe6ba[24]](function(_0xa3dex13){_0xa3dex12= _[_0xe6ba[23]](_0xa3dex12,_[_0xe6ba[22]](_0xa3dex13.Users,_0xe6ba[21]))});return {$or:{queue:_[_0xe6ba[22]](_0xa3dex11[_0xe6ba[25]],_0xe6ba[21]),memberid:_0xa3dex12}}});case _0xe6ba[30]:return User[_0xe6ba[27]](_0xa3dex10[_0xe6ba[21]],{attributes:[_0xe6ba[21]]})[_0xe6ba[16]](function(_0xa3dex14){return _0xa3dex14[_0xe6ba[29]]({attributes:[_0xe6ba[21]]})})[_0xe6ba[16]](function(_0xa3dex11){return {$or:{queue:_[_0xe6ba[22]](_0xa3dex11,_0xe6ba[21]),memberid:_0xa3dex10[_0xe6ba[21]]}}});default:return {}}}}exports[_0xe6ba[32]]= function(_0xa3dex9,_0xa3dexa){return Promise[_0xe6ba[37]]([])[_0xe6ba[16]](getMailQueues(_0xa3dex9[_0xe6ba[28]]))[_0xe6ba[16]](function(_0xa3dex16){return ReportMailSession[_0xe6ba[36]](Util[_0xe6ba[18]](_0xa3dex9[_0xe6ba[17]],_[_0xe6ba[35]]({timeout:true,createdAt:{$gte:moment()[_0xe6ba[34]](_0xe6ba[33])}},_0xa3dex16)))})[_0xe6ba[16]](function(_0xa3dex15){return _0xa3dexa[_0xe6ba[15]](200)[_0xe6ba[14]]({value:_0xa3dex15})})[_0xe6ba[13]](function(_0xa3dexc){return handleError(_0xa3dexa,_0xa3dexc)})};exports[_0xe6ba[38]]= function(_0xa3dex9,_0xa3dexa){return Promise[_0xe6ba[37]]([])[_0xe6ba[16]](getMailQueues(_0xa3dex9[_0xe6ba[28]]))[_0xe6ba[16]](function(_0xa3dex16){return ReportMailSession[_0xe6ba[36]](Util[_0xe6ba[18]](_0xa3dex9[_0xe6ba[17]],_[_0xe6ba[35]]({leaveAt:null,createdAt:{$gte:moment()[_0xe6ba[34]](_0xe6ba[33])}},_0xa3dex16)))})[_0xe6ba[16]](function(_0xa3dex15){return _0xa3dexa[_0xe6ba[15]](200)[_0xe6ba[14]]({value:_0xa3dex15})})[_0xe6ba[13]](function(_0xa3dexc){return handleError(_0xa3dexa,_0xa3dexc)})};exports[_0xe6ba[39]]= function(_0xa3dex9,_0xa3dexa){return Promise[_0xe6ba[37]]([])[_0xe6ba[16]](getMailQueues(_0xa3dex9[_0xe6ba[28]]))[_0xe6ba[16]](function(_0xa3dex16){return ReportMailSession[_0xe6ba[40]](Util[_0xe6ba[18]](_0xa3dex9[_0xe6ba[17]],_[_0xe6ba[35]]({leaveAt:null},_0xa3dex16)))})[_0xe6ba[16]](function(_0xa3dex15){return _0xa3dexa[_0xe6ba[15]](200)[_0xe6ba[14]]({rows:_0xa3dex15})})[_0xe6ba[13]](function(_0xa3dexc){return handleError(_0xa3dexa,_0xa3dexc)})};exports[_0xe6ba[41]]= function(_0xa3dex9,_0xa3dexa){var _0xa3dex17={waiting:0,timeout:0};return ReportMailSession[_0xe6ba[36]]({where:{leaveAt:null,createdAt:{$gte:moment()[_0xe6ba[34]](_0xe6ba[33])}}})[_0xe6ba[16]](function(_0xa3dexd){if(_0xa3dexd){_0xa3dex17[_0xe6ba[38]]= _0xa3dexd};return ReportMailSession[_0xe6ba[36]]({where:{timeout:true,createdAt:{$gte:moment()[_0xe6ba[34]](_0xe6ba[33])}}})})[_0xe6ba[16]](function(_0xa3dexd){if(_0xa3dexd){_0xa3dex17[_0xe6ba[32]]= _0xa3dexd};return _0xa3dexa[_0xe6ba[15]](200)[_0xe6ba[14]](_0xa3dex17)})[_0xe6ba[13]](function(_0xa3dexc){return handleError(_0xa3dexa,_0xa3dexc)})};function handleError(_0xa3dexa,_0xa3dexc){logger[_0xe6ba[43]](_0xa3dexc[_0xe6ba[42]]);return _0xa3dexa[_0xe6ba[15]](500)[_0xe6ba[14]](_0xa3dexc)}
\ No newline at end of file
+var _0xfb46=["\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","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\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\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","\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","\x67\x65\x74\x44\x61\x73\x68\x62\x6F\x61\x72\x64\x56\x61\x6C\x75\x65\x73","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72"];_0xfb46[0];var _=require(_0xfb46[1]);var ReportMailSession=require(_0xfb46[3])[_0xfb46[2]];var ReportMailSessionHistory=require(_0xfb46[3])[_0xfb46[5]][_0xfb46[4]];var Util=require(_0xfb46[6]);var User=require(_0xfb46[3])[_0xfb46[7]];var Promise=require(_0xfb46[8]);var moment=require(_0xfb46[9]);var logger=require(_0xfb46[11])(_0xfb46[10]);exports[_0xfb46[12]]= function(_0xeb1ex9,_0xeb1exa,_0xeb1exb){return ReportMailSession[_0xfb46[19]](Util[_0xfb46[18]](_0xeb1ex9[_0xfb46[17]]))[_0xfb46[16]](function(_0xeb1exd){_0xeb1exa[_0xfb46[15]](200)[_0xfb46[14]](_0xeb1exd)})[_0xfb46[13]](function(_0xeb1exc){return handleError(_0xeb1exa,_0xeb1exc)})};exports[_0xfb46[20]]= function(_0xeb1ex9,_0xeb1exa){return ReportMailSession[_0xfb46[20]]()[_0xfb46[16]](function(_0xeb1exe){return _0xeb1exa[_0xfb46[15]](200)[_0xfb46[14]](_0xeb1exe)})[_0xfb46[13]](function(_0xeb1exc){return handleError(_0xeb1exa,_0xeb1exc)})};function getMailQueues(_0xeb1ex10){return function(){switch(_0xeb1ex10[_0xfb46[31]]){case _0xfb46[28]:return User[_0xfb46[27]](_0xeb1ex10[_0xfb46[21]],{attributes:[_0xfb46[21]]})[_0xfb46[16]](Util[_0xfb46[26]]({},{attributes:[_0xfb46[21]],include:[{raw:true,model:User,attributes:[_0xfb46[21]]}]}))[_0xfb46[16]](function(_0xeb1ex11){var _0xeb1ex12=[];_0xeb1ex11[_0xfb46[25]][_0xfb46[24]](function(_0xeb1ex13){_0xeb1ex12= _[_0xfb46[23]](_0xeb1ex12,_[_0xfb46[22]](_0xeb1ex13.Users,_0xfb46[21]))});return {$or:{queue:_[_0xfb46[22]](_0xeb1ex11[_0xfb46[25]],_0xfb46[21]),memberid:_0xeb1ex12}}});case _0xfb46[30]:return User[_0xfb46[27]](_0xeb1ex10[_0xfb46[21]],{attributes:[_0xfb46[21]]})[_0xfb46[16]](function(_0xeb1ex14){return _0xeb1ex14[_0xfb46[29]]({attributes:[_0xfb46[21]]})})[_0xfb46[16]](function(_0xeb1ex11){return {$or:{queue:_[_0xfb46[22]](_0xeb1ex11,_0xfb46[21]),memberid:_0xeb1ex10[_0xfb46[21]]}}});default:return {}}}}exports[_0xfb46[32]]= function(_0xeb1ex9,_0xeb1exa){return Promise[_0xfb46[37]]([])[_0xfb46[16]](getMailQueues(_0xeb1ex9[_0xfb46[28]]))[_0xfb46[16]](function(_0xeb1ex16){return ReportMailSession[_0xfb46[36]](Util[_0xfb46[18]](_0xeb1ex9[_0xfb46[17]],_[_0xfb46[35]]({timeout:true,createdAt:{$gte:moment()[_0xfb46[34]](_0xfb46[33])}},_0xeb1ex16)))})[_0xfb46[16]](function(_0xeb1ex15){return _0xeb1exa[_0xfb46[15]](200)[_0xfb46[14]]({value:_0xeb1ex15})})[_0xfb46[13]](function(_0xeb1exc){return handleError(_0xeb1exa,_0xeb1exc)})};exports[_0xfb46[38]]= function(_0xeb1ex9,_0xeb1exa){return Promise[_0xfb46[37]]([])[_0xfb46[16]](getMailQueues(_0xeb1ex9[_0xfb46[28]]))[_0xfb46[16]](function(_0xeb1ex16){return ReportMailSession[_0xfb46[36]](Util[_0xfb46[18]](_0xeb1ex9[_0xfb46[17]],_[_0xfb46[35]]({leaveAt:null,createdAt:{$gte:moment()[_0xfb46[34]](_0xfb46[33])}},_0xeb1ex16)))})[_0xfb46[16]](function(_0xeb1ex15){return _0xeb1exa[_0xfb46[15]](200)[_0xfb46[14]]({value:_0xeb1ex15})})[_0xfb46[13]](function(_0xeb1exc){return handleError(_0xeb1exa,_0xeb1exc)})};exports[_0xfb46[39]]= function(_0xeb1ex9,_0xeb1exa){return Promise[_0xfb46[37]]([])[_0xfb46[16]](getMailQueues(_0xeb1ex9[_0xfb46[28]]))[_0xfb46[16]](function(_0xeb1ex16){return ReportMailSession[_0xfb46[40]](Util[_0xfb46[18]](_0xeb1ex9[_0xfb46[17]],_[_0xfb46[35]]({leaveAt:null},_0xeb1ex16)))})[_0xfb46[16]](function(_0xeb1ex15){return _0xeb1exa[_0xfb46[15]](200)[_0xfb46[14]]({rows:_0xeb1ex15})})[_0xfb46[13]](function(_0xeb1exc){return handleError(_0xeb1exa,_0xeb1exc)})};exports[_0xfb46[41]]= function(_0xeb1ex9,_0xeb1exa){var _0xeb1ex17={waiting:0,timeout:0};return ReportMailSession[_0xfb46[36]]({where:{leaveAt:null,createdAt:{$gte:moment()[_0xfb46[34]](_0xfb46[33])}}})[_0xfb46[16]](function(_0xeb1exd){if(_0xeb1exd){_0xeb1ex17[_0xfb46[38]]= _0xeb1exd};return ReportMailSession[_0xfb46[36]]({where:{timeout:true,createdAt:{$gte:moment()[_0xfb46[34]](_0xfb46[33])}}})})[_0xfb46[16]](function(_0xeb1exd){if(_0xeb1exd){_0xeb1ex17[_0xfb46[32]]= _0xeb1exd};return _0xeb1exa[_0xfb46[15]](200)[_0xfb46[14]](_0xeb1ex17)})[_0xfb46[13]](function(_0xeb1exc){return handleError(_0xeb1exa,_0xeb1exc)})};function handleError(_0xeb1exa,_0xeb1exc){logger[_0xfb46[43]](_0xeb1exc[_0xfb46[42]]);return _0xeb1exa[_0xfb46[15]](500)[_0xfb46[14]](_0xeb1exc)}
\ No newline at end of file