Built motion from commit ded083d.|0.0.43
[motion.git] / server / api / mail_account / mail_account.controller.js
1 var _0x70e5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x73\x79\x6E\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\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\x41\x63\x63\x6F\x75\x6E\x74","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\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\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\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","\x73\x68\x6F\x77\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x6C\x65\x6E\x67\x74\x68","\x67\x65\x74\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x70\x72\x69\x6F\x72\x69\x74\x79","\x66\x6F\x72\x45\x61\x63\x68","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x61\x70\x70\x49\x64","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73"];_0x70e5[0];var _=require(_0x70e5[1]);var util=require(_0x70e5[2]);var async=require(_0x70e5[3]);var Util=require(_0x70e5[4]);var sequelize=require(_0x70e5[6])[_0x70e5[5]];var MailAccount=require(_0x70e5[6])[_0x70e5[7]];var MailServerIn=require(_0x70e5[6])[_0x70e5[8]];var MailServerOut=require(_0x70e5[6])[_0x70e5[9]];var MailApplication=require(_0x70e5[6])[_0x70e5[10]];exports[_0x70e5[11]]=function(_0xa575xa,_0xa575xb){return MailAccount[_0x70e5[20]](_0x70e5[19])[_0x70e5[18]](Util[_0x70e5[17]](_0xa575xa[_0x70e5[16]]))[_0x70e5[15]](function(_0xa575xd){_0xa575xb[_0x70e5[14]](200)[_0x70e5[13]](_0xa575xd)})[_0x70e5[12]](function(_0xa575xc){return handleError(_0xa575xb,_0xa575xc)})};exports[_0x70e5[21]]=function(_0xa575xa,_0xa575xb,_0xa575xe){return MailAccount[_0x70e5[20]](_0x70e5[19])[_0x70e5[25]](_0xa575xa[_0x70e5[24]][_0x70e5[23]])[_0x70e5[15]](function(_0xa575xf){if(!_0xa575xf){return _0xa575xb[_0x70e5[22]](404)};return _0xa575xb[_0x70e5[13]](_0xa575xf)})[_0x70e5[12]](function(_0xa575xc){return handleError(_0xa575xb,_0xa575xc)})};exports[_0x70e5[26]]=function(_0xa575xa,_0xa575xb,_0xa575xe){return MailAccount[_0x70e5[20]](_0x70e5[19])[_0x70e5[25]](_0xa575xa[_0x70e5[24]][_0x70e5[23]])[_0x70e5[15]](function(_0xa575xf){if(!_0xa575xf){return _0xa575xb[_0x70e5[22]](404)};return _0xa575xf[_0x70e5[28]](Util[_0x70e5[17]](_0xa575xa[_0x70e5[16]]))})[_0x70e5[15]](function(_0xa575x10){return _0xa575xb[_0x70e5[13]]({count:_0xa575x10[_0x70e5[27]],rows:_0xa575x10})})[_0x70e5[12]](function(_0xa575xc){return handleError(_0xa575xb,_0xa575xc)})};exports[_0x70e5[29]]=function(_0xa575xa,_0xa575xb,_0xa575xe){return sequelize[_0x70e5[31]](function(_0xa575x11){return MailAccount[_0x70e5[29]](_0xa575xa[_0x70e5[30]],{include:[{model:MailServerIn},{model:MailServerOut}],transaction:_0xa575x11})})[_0x70e5[15]](function(_0xa575xf){return _0xa575xb[_0x70e5[14]](201)[_0x70e5[13]](_0xa575xf)})[_0x70e5[12]](function(_0xa575xc){return handleError(_0xa575xb,_0xa575xc)})};exports[_0x70e5[32]]=function(_0xa575xa,_0xa575xb){if(_0xa575xa[_0x70e5[30]][_0x70e5[23]]){delete _0xa575xa[_0x70e5[30]][_0x70e5[23]]};return MailAccount[_0x70e5[25]](_0xa575xa[_0x70e5[24]][_0x70e5[23]])[_0x70e5[15]](function(_0xa575xf){if(!_0xa575xf){return _0xa575xb[_0x70e5[22]](404)};var _0xa575x12=_[_0x70e5[33]](_0xa575xf,_0xa575xa[_0x70e5[30]]);return _0xa575x12[_0x70e5[34]]()})[_0x70e5[15]](function(_0xa575xf){return _0xa575xb[_0x70e5[14]](200)[_0x70e5[13]](_0xa575xf)})[_0x70e5[12]](function(_0xa575xc){return handleError(_0xa575xb,_0xa575xc)})};exports[_0x70e5[35]]=function(_0xa575xa,_0xa575xb){var _0xa575x13=0;var _0xa575x14=_0xa575xa[_0x70e5[30]];_0xa575x14[_0x70e5[39]](function(_0xa575x15){delete _0xa575x15[_0x70e5[23]];delete _0xa575x15[_0x70e5[36]];delete _0xa575x15[_0x70e5[37]];_0xa575x15[_0x70e5[38]]= ++_0xa575x13});return sequelize[_0x70e5[31]](function(_0xa575x11){return MailApplication[_0x70e5[41]]({where:{MailAccountId:_0xa575xa[_0x70e5[24]][_0x70e5[23]]},individualHooks:true,transaction:_0xa575x11})[_0x70e5[15]](function(_0xa575x17){return MailApplication[_0x70e5[40]](_0xa575x14,{individualHooks:true,transaction:_0xa575x11})})})[_0x70e5[15]](function(_0xa575x16){return _0xa575xb[_0x70e5[14]](200)[_0x70e5[13]]({count:_0xa575x16[_0x70e5[27]],rows:_0xa575x16})})[_0x70e5[12]](function(_0xa575xc){return handleError(_0xa575xb,_0xa575xc)})};exports[_0x70e5[41]]=function(_0xa575xa,_0xa575xb,_0xa575xe){return MailAccount[_0x70e5[25]](_0xa575xa[_0x70e5[24]][_0x70e5[23]])[_0x70e5[15]](function(_0xa575xf){if(!_0xa575xf){return _0xa575xb[_0x70e5[22]](404)};return _0xa575xf[_0x70e5[41]]()})[_0x70e5[15]](function(){return _0xa575xb[_0x70e5[22]](204)})[_0x70e5[12]](function(_0xa575xc){return handleError(_0xa575xb,_0xa575xc)})};exports[_0x70e5[42]]=function(_0xa575xa,_0xa575xb,_0xa575xe){return MailApplication[_0x70e5[25]](_0xa575xa[_0x70e5[24]][_0x70e5[43]])[_0x70e5[15]](function(_0xa575xf){if(!_0xa575xf){return _0xa575xb[_0x70e5[22]](404)};return _0xa575xf[_0x70e5[41]]()})[_0x70e5[15]](function(){return _0xa575xb[_0x70e5[22]](204)})[_0x70e5[12]](function(_0xa575xc){return handleError(_0xa575xb,_0xa575xc)})};exports[_0x70e5[44]]=function(_0xa575xa,_0xa575xb){return MailAccount[_0x70e5[41]]({where:{id:_0xa575xa[_0x70e5[16]][_0x70e5[45]]},individualHooks:true})[_0x70e5[15]](function(){return _0xa575xb[_0x70e5[22]](204)})[_0x70e5[12]](function(_0xa575xc){return handleError(_0xa575xb,_0xa575xc)})};exports[_0x70e5[46]]=function(_0xa575xa,_0xa575xb){return MailApplication[_0x70e5[41]]({where:{id:_0xa575xa[_0x70e5[16]][_0x70e5[45]]},individualHooks:true})[_0x70e5[15]](function(){return _0xa575xb[_0x70e5[22]](204)})[_0x70e5[12]](function(_0xa575xc){return handleError(_0xa575xb,_0xa575xc)})};function handleError(_0xa575xb,_0xa575xc){return _0xa575xb[_0x70e5[14]](500)[_0x70e5[13]](_0xa575xc)}