Built motion from commit e5f953e.|0.0.46
[motion.git] / server / api / mail_account / mail_account.controller.js
index 983f50c..bc56b85 100644 (file)
@@ -1 +1 @@
-var _0x8f7c=["\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"];_0x8f7c[0];var _=require(_0x8f7c[1]);var util=require(_0x8f7c[2]);var async=require(_0x8f7c[3]);var Util=require(_0x8f7c[4]);var sequelize=require(_0x8f7c[6])[_0x8f7c[5]];var MailAccount=require(_0x8f7c[6])[_0x8f7c[7]];var MailServerIn=require(_0x8f7c[6])[_0x8f7c[8]];var MailServerOut=require(_0x8f7c[6])[_0x8f7c[9]];var MailApplication=require(_0x8f7c[6])[_0x8f7c[10]];exports[_0x8f7c[11]]=function(_0x3c5cxa,_0x3c5cxb){return MailAccount[_0x8f7c[20]](_0x8f7c[19])[_0x8f7c[18]](Util[_0x8f7c[17]](_0x3c5cxa[_0x8f7c[16]]))[_0x8f7c[15]](function(_0x3c5cxd){_0x3c5cxb[_0x8f7c[14]](200)[_0x8f7c[13]](_0x3c5cxd)})[_0x8f7c[12]](function(_0x3c5cxc){return handleError(_0x3c5cxb,_0x3c5cxc)})};exports[_0x8f7c[21]]=function(_0x3c5cxa,_0x3c5cxb,_0x3c5cxe){return MailAccount[_0x8f7c[20]](_0x8f7c[19])[_0x8f7c[25]](_0x3c5cxa[_0x8f7c[24]][_0x8f7c[23]])[_0x8f7c[15]](function(_0x3c5cxf){if(!_0x3c5cxf){return _0x3c5cxb[_0x8f7c[22]](404)};return _0x3c5cxb[_0x8f7c[13]](_0x3c5cxf)})[_0x8f7c[12]](function(_0x3c5cxc){return handleError(_0x3c5cxb,_0x3c5cxc)})};exports[_0x8f7c[26]]=function(_0x3c5cxa,_0x3c5cxb,_0x3c5cxe){return MailAccount[_0x8f7c[20]](_0x8f7c[19])[_0x8f7c[25]](_0x3c5cxa[_0x8f7c[24]][_0x8f7c[23]])[_0x8f7c[15]](function(_0x3c5cxf){if(!_0x3c5cxf){return _0x3c5cxb[_0x8f7c[22]](404)};return _0x3c5cxf[_0x8f7c[28]](Util[_0x8f7c[17]](_0x3c5cxa[_0x8f7c[16]]))})[_0x8f7c[15]](function(_0x3c5cx10){return _0x3c5cxb[_0x8f7c[13]]({count:_0x3c5cx10[_0x8f7c[27]],rows:_0x3c5cx10})})[_0x8f7c[12]](function(_0x3c5cxc){return handleError(_0x3c5cxb,_0x3c5cxc)})};exports[_0x8f7c[29]]=function(_0x3c5cxa,_0x3c5cxb,_0x3c5cxe){return sequelize[_0x8f7c[31]](function(_0x3c5cx11){return MailAccount[_0x8f7c[29]](_0x3c5cxa[_0x8f7c[30]],{include:[{model:MailServerIn},{model:MailServerOut}],transaction:_0x3c5cx11})})[_0x8f7c[15]](function(_0x3c5cxf){return _0x3c5cxb[_0x8f7c[14]](201)[_0x8f7c[13]](_0x3c5cxf)})[_0x8f7c[12]](function(_0x3c5cxc){return handleError(_0x3c5cxb,_0x3c5cxc)})};exports[_0x8f7c[32]]=function(_0x3c5cxa,_0x3c5cxb){if(_0x3c5cxa[_0x8f7c[30]][_0x8f7c[23]]){delete _0x3c5cxa[_0x8f7c[30]][_0x8f7c[23]]};return MailAccount[_0x8f7c[25]](_0x3c5cxa[_0x8f7c[24]][_0x8f7c[23]])[_0x8f7c[15]](function(_0x3c5cxf){if(!_0x3c5cxf){return _0x3c5cxb[_0x8f7c[22]](404)};var _0x3c5cx12=_[_0x8f7c[33]](_0x3c5cxf,_0x3c5cxa[_0x8f7c[30]]);return _0x3c5cx12[_0x8f7c[34]]()})[_0x8f7c[15]](function(_0x3c5cxf){return _0x3c5cxb[_0x8f7c[14]](200)[_0x8f7c[13]](_0x3c5cxf)})[_0x8f7c[12]](function(_0x3c5cxc){return handleError(_0x3c5cxb,_0x3c5cxc)})};exports[_0x8f7c[35]]=function(_0x3c5cxa,_0x3c5cxb){var _0x3c5cx13=0;var _0x3c5cx14=_0x3c5cxa[_0x8f7c[30]];_0x3c5cx14[_0x8f7c[39]](function(_0x3c5cx15){delete _0x3c5cx15[_0x8f7c[23]];delete _0x3c5cx15[_0x8f7c[36]];delete _0x3c5cx15[_0x8f7c[37]];_0x3c5cx15[_0x8f7c[38]]= ++_0x3c5cx13});return sequelize[_0x8f7c[31]](function(_0x3c5cx11){return MailApplication[_0x8f7c[41]]({where:{MailAccountId:_0x3c5cxa[_0x8f7c[24]][_0x8f7c[23]]},individualHooks:true,transaction:_0x3c5cx11})[_0x8f7c[15]](function(_0x3c5cx17){return MailApplication[_0x8f7c[40]](_0x3c5cx14,{individualHooks:true,transaction:_0x3c5cx11})})})[_0x8f7c[15]](function(_0x3c5cx16){return _0x3c5cxb[_0x8f7c[14]](200)[_0x8f7c[13]]({count:_0x3c5cx16[_0x8f7c[27]],rows:_0x3c5cx16})})[_0x8f7c[12]](function(_0x3c5cxc){return handleError(_0x3c5cxb,_0x3c5cxc)})};exports[_0x8f7c[41]]=function(_0x3c5cxa,_0x3c5cxb,_0x3c5cxe){return MailAccount[_0x8f7c[25]](_0x3c5cxa[_0x8f7c[24]][_0x8f7c[23]])[_0x8f7c[15]](function(_0x3c5cxf){if(!_0x3c5cxf){return _0x3c5cxb[_0x8f7c[22]](404)};return _0x3c5cxf[_0x8f7c[41]]()})[_0x8f7c[15]](function(){return _0x3c5cxb[_0x8f7c[22]](204)})[_0x8f7c[12]](function(_0x3c5cxc){return handleError(_0x3c5cxb,_0x3c5cxc)})};exports[_0x8f7c[42]]=function(_0x3c5cxa,_0x3c5cxb,_0x3c5cxe){return MailApplication[_0x8f7c[25]](_0x3c5cxa[_0x8f7c[24]][_0x8f7c[43]])[_0x8f7c[15]](function(_0x3c5cxf){if(!_0x3c5cxf){return _0x3c5cxb[_0x8f7c[22]](404)};return _0x3c5cxf[_0x8f7c[41]]()})[_0x8f7c[15]](function(){return _0x3c5cxb[_0x8f7c[22]](204)})[_0x8f7c[12]](function(_0x3c5cxc){return handleError(_0x3c5cxb,_0x3c5cxc)})};exports[_0x8f7c[44]]=function(_0x3c5cxa,_0x3c5cxb){return MailAccount[_0x8f7c[41]]({where:{id:_0x3c5cxa[_0x8f7c[16]][_0x8f7c[45]]},individualHooks:true})[_0x8f7c[15]](function(){return _0x3c5cxb[_0x8f7c[22]](204)})[_0x8f7c[12]](function(_0x3c5cxc){return handleError(_0x3c5cxb,_0x3c5cxc)})};exports[_0x8f7c[46]]=function(_0x3c5cxa,_0x3c5cxb){return MailApplication[_0x8f7c[41]]({where:{id:_0x3c5cxa[_0x8f7c[16]][_0x8f7c[45]]},individualHooks:true})[_0x8f7c[15]](function(){return _0x3c5cxb[_0x8f7c[22]](204)})[_0x8f7c[12]](function(_0x3c5cxc){return handleError(_0x3c5cxb,_0x3c5cxc)})};function handleError(_0x3c5cxb,_0x3c5cxc){return _0x3c5cxb[_0x8f7c[14]](500)[_0x8f7c[13]](_0x3c5cxc)}
\ No newline at end of file
+var _0xdfe5=["\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"];_0xdfe5[0];var _=require(_0xdfe5[1]);var util=require(_0xdfe5[2]);var async=require(_0xdfe5[3]);var Util=require(_0xdfe5[4]);var sequelize=require(_0xdfe5[6])[_0xdfe5[5]];var MailAccount=require(_0xdfe5[6])[_0xdfe5[7]];var MailServerIn=require(_0xdfe5[6])[_0xdfe5[8]];var MailServerOut=require(_0xdfe5[6])[_0xdfe5[9]];var MailApplication=require(_0xdfe5[6])[_0xdfe5[10]];exports[_0xdfe5[11]]=function(_0x24bfxa,_0x24bfxb){return MailAccount[_0xdfe5[20]](_0xdfe5[19])[_0xdfe5[18]](Util[_0xdfe5[17]](_0x24bfxa[_0xdfe5[16]]))[_0xdfe5[15]](function(_0x24bfxd){_0x24bfxb[_0xdfe5[14]](200)[_0xdfe5[13]](_0x24bfxd)})[_0xdfe5[12]](function(_0x24bfxc){return handleError(_0x24bfxb,_0x24bfxc)})};exports[_0xdfe5[21]]=function(_0x24bfxa,_0x24bfxb,_0x24bfxe){return MailAccount[_0xdfe5[20]](_0xdfe5[19])[_0xdfe5[25]](_0x24bfxa[_0xdfe5[24]][_0xdfe5[23]])[_0xdfe5[15]](function(_0x24bfxf){if(!_0x24bfxf){return _0x24bfxb[_0xdfe5[22]](404)};return _0x24bfxb[_0xdfe5[13]](_0x24bfxf)})[_0xdfe5[12]](function(_0x24bfxc){return handleError(_0x24bfxb,_0x24bfxc)})};exports[_0xdfe5[26]]=function(_0x24bfxa,_0x24bfxb,_0x24bfxe){return MailAccount[_0xdfe5[20]](_0xdfe5[19])[_0xdfe5[25]](_0x24bfxa[_0xdfe5[24]][_0xdfe5[23]])[_0xdfe5[15]](function(_0x24bfxf){if(!_0x24bfxf){return _0x24bfxb[_0xdfe5[22]](404)};return _0x24bfxf[_0xdfe5[28]](Util[_0xdfe5[17]](_0x24bfxa[_0xdfe5[16]]))})[_0xdfe5[15]](function(_0x24bfx10){return _0x24bfxb[_0xdfe5[13]]({count:_0x24bfx10[_0xdfe5[27]],rows:_0x24bfx10})})[_0xdfe5[12]](function(_0x24bfxc){return handleError(_0x24bfxb,_0x24bfxc)})};exports[_0xdfe5[29]]=function(_0x24bfxa,_0x24bfxb,_0x24bfxe){return sequelize[_0xdfe5[31]](function(_0x24bfx11){return MailAccount[_0xdfe5[29]](_0x24bfxa[_0xdfe5[30]],{include:[{model:MailServerIn},{model:MailServerOut}],transaction:_0x24bfx11})})[_0xdfe5[15]](function(_0x24bfxf){return _0x24bfxb[_0xdfe5[14]](201)[_0xdfe5[13]](_0x24bfxf)})[_0xdfe5[12]](function(_0x24bfxc){return handleError(_0x24bfxb,_0x24bfxc)})};exports[_0xdfe5[32]]=function(_0x24bfxa,_0x24bfxb){if(_0x24bfxa[_0xdfe5[30]][_0xdfe5[23]]){delete _0x24bfxa[_0xdfe5[30]][_0xdfe5[23]]};return MailAccount[_0xdfe5[25]](_0x24bfxa[_0xdfe5[24]][_0xdfe5[23]])[_0xdfe5[15]](function(_0x24bfxf){if(!_0x24bfxf){return _0x24bfxb[_0xdfe5[22]](404)};var _0x24bfx12=_[_0xdfe5[33]](_0x24bfxf,_0x24bfxa[_0xdfe5[30]]);return _0x24bfx12[_0xdfe5[34]]()})[_0xdfe5[15]](function(_0x24bfxf){return _0x24bfxb[_0xdfe5[14]](200)[_0xdfe5[13]](_0x24bfxf)})[_0xdfe5[12]](function(_0x24bfxc){return handleError(_0x24bfxb,_0x24bfxc)})};exports[_0xdfe5[35]]=function(_0x24bfxa,_0x24bfxb){var _0x24bfx13=0;var _0x24bfx14=_0x24bfxa[_0xdfe5[30]];_0x24bfx14[_0xdfe5[39]](function(_0x24bfx15){delete _0x24bfx15[_0xdfe5[23]];delete _0x24bfx15[_0xdfe5[36]];delete _0x24bfx15[_0xdfe5[37]];_0x24bfx15[_0xdfe5[38]]= ++_0x24bfx13});return sequelize[_0xdfe5[31]](function(_0x24bfx11){return MailApplication[_0xdfe5[41]]({where:{MailAccountId:_0x24bfxa[_0xdfe5[24]][_0xdfe5[23]]},individualHooks:true,transaction:_0x24bfx11})[_0xdfe5[15]](function(_0x24bfx17){return MailApplication[_0xdfe5[40]](_0x24bfx14,{individualHooks:true,transaction:_0x24bfx11})})})[_0xdfe5[15]](function(_0x24bfx16){return _0x24bfxb[_0xdfe5[14]](200)[_0xdfe5[13]]({count:_0x24bfx16[_0xdfe5[27]],rows:_0x24bfx16})})[_0xdfe5[12]](function(_0x24bfxc){return handleError(_0x24bfxb,_0x24bfxc)})};exports[_0xdfe5[41]]=function(_0x24bfxa,_0x24bfxb,_0x24bfxe){return MailAccount[_0xdfe5[25]](_0x24bfxa[_0xdfe5[24]][_0xdfe5[23]])[_0xdfe5[15]](function(_0x24bfxf){if(!_0x24bfxf){return _0x24bfxb[_0xdfe5[22]](404)};return _0x24bfxf[_0xdfe5[41]]()})[_0xdfe5[15]](function(){return _0x24bfxb[_0xdfe5[22]](204)})[_0xdfe5[12]](function(_0x24bfxc){return handleError(_0x24bfxb,_0x24bfxc)})};exports[_0xdfe5[42]]=function(_0x24bfxa,_0x24bfxb,_0x24bfxe){return MailApplication[_0xdfe5[25]](_0x24bfxa[_0xdfe5[24]][_0xdfe5[43]])[_0xdfe5[15]](function(_0x24bfx17){if(!_0x24bfx17){return _0x24bfxb[_0xdfe5[22]](404)};return _0x24bfx17[_0xdfe5[41]]()})[_0xdfe5[15]](function(){return _0x24bfxb[_0xdfe5[22]](204)})[_0xdfe5[12]](function(_0x24bfxc){return handleError(_0x24bfxb,_0x24bfxc)})};exports[_0xdfe5[44]]=function(_0x24bfxa,_0x24bfxb){return MailAccount[_0xdfe5[41]]({where:{id:_0x24bfxa[_0xdfe5[16]][_0xdfe5[45]]},individualHooks:true})[_0xdfe5[15]](function(){return _0x24bfxb[_0xdfe5[22]](204)})[_0xdfe5[12]](function(_0x24bfxc){return handleError(_0x24bfxb,_0x24bfxc)})};exports[_0xdfe5[46]]=function(_0x24bfxa,_0x24bfxb){return MailApplication[_0xdfe5[41]]({where:{id:_0x24bfxa[_0xdfe5[16]][_0xdfe5[45]]},individualHooks:true})[_0xdfe5[15]](function(){return _0x24bfxb[_0xdfe5[22]](204)})[_0xdfe5[12]](function(_0x24bfxc){return handleError(_0x24bfxb,_0x24bfxc)})};function handleError(_0x24bfxb,_0x24bfxc){return _0x24bfxb[_0xdfe5[14]](500)[_0xdfe5[13]](_0x24bfxc)}
\ No newline at end of file