X-Git-Url: http://repos.xcallymotion.com/?a=blobdiff_plain;f=server%2Fapi%2FmailAccount%2FmailAccount.model.js;h=19324562ba4654cce4b6aa11ff8b97a4c8b33a5f;hb=8cdeeda1196ee7d2ad7723378ea9a4f6c5d1e83a;hp=a340f709817831e08dac60e27738ad7a1c42f574;hpb=b8feeab5a72cbb7651a1c603fc767034cd5922cc;p=motion2.git diff --git a/server/api/mailAccount/mailAccount.model.js b/server/api/mailAccount/mailAccount.model.js index a340f70..1932456 100644 --- a/server/api/mailAccount/mailAccount.model.js +++ b/server/api/mailAccount/mailAccount.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd57b=['./mailAccount.attributes','exports','define','mail_accounts','custom','service','Smtp','host','port','secure','authentication','modernAuthentication','Cloud\x20Provider\x20configuration\x20not\x20found','user','CloudProvider','data5'];(function(_0x5653da,_0x3a0b8f){var _0x1199b5=function(_0x42c50d){while(--_0x42c50d){_0x5653da['push'](_0x5653da['shift']());}};_0x1199b5(++_0x3a0b8f);}(_0xd57b,0xd0));var _0xbd57=function(_0x223461,_0x2bca70){_0x223461=_0x223461-0x0;var _0x4dbe0a=_0xd57b[_0x223461];return _0x4dbe0a;};'use strict';var attributes=require(_0xbd57('0x0'));module[_0xbd57('0x1')]=function(_0x20c95f){return _0x20c95f[_0xbd57('0x2')]('MailAccount',attributes,{'tableName':_0xbd57('0x3'),'paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'getSmtpOptions':function(){var _0x3565fd=this;var _0x3259a3={'id':_0x3565fd['id'],'tls':{'rejectUnauthorized':![]}};if(_0x3565fd['provider']!==_0xbd57('0x4')){_0x3259a3[_0xbd57('0x5')]=_0x3565fd['provider'];}else{_0x3259a3['host']=_0x3565fd[_0xbd57('0x6')][_0xbd57('0x7')];_0x3259a3['port']=_0x3565fd[_0xbd57('0x6')][_0xbd57('0x8')];_0x3259a3[_0xbd57('0x9')]=_0x3565fd[_0xbd57('0x6')][_0xbd57('0x9')];}if(_0x3565fd[_0xbd57('0x6')][_0xbd57('0xa')]){if(_0x3565fd['Smtp'][_0xbd57('0xb')]){if(!_0x3565fd['Smtp']['CloudProvider'])throw new Error(_0xbd57('0xc'));_0x3259a3['auth']={'type':'OAuth2','user':_0x3565fd['Smtp'][_0xbd57('0xd')],'accessToken':_0x3565fd[_0xbd57('0x6')][_0xbd57('0xe')][_0xbd57('0xf')]};}else{_0x3259a3['auth']={'user':_0x3565fd[_0xbd57('0x6')][_0xbd57('0xd')],'pass':_0x3565fd['Smtp']['pass']};}}return _0x3259a3;}}});}; \ No newline at end of file +var _0x779f=['define','mail_accounts','provider','service','host','Smtp','secure','modernAuthentication','CloudProvider','Cloud\x20Provider\x20configuration\x20not\x20found','auth','OAuth2','user','data5','pass'];(function(_0x334651,_0x6e99f6){var _0x29657c=function(_0x420a94){while(--_0x420a94){_0x334651['push'](_0x334651['shift']());}};_0x29657c(++_0x6e99f6);}(_0x779f,0x14a));var _0xf779=function(_0x2f81e6,_0x4f1c93){_0x2f81e6=_0x2f81e6-0x0;var _0x151638=_0x779f[_0x2f81e6];return _0x151638;};'use strict';var attributes=require('./mailAccount.attributes');module['exports']=function(_0x799354){return _0x799354[_0xf779('0x0')]('MailAccount',attributes,{'tableName':_0xf779('0x1'),'paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'getSmtpOptions':function(){var _0x55db8c=this;var _0x2662ec={'id':_0x55db8c['id'],'tls':{'rejectUnauthorized':![]}};if(_0x55db8c[_0xf779('0x2')]!=='custom'){_0x2662ec[_0xf779('0x3')]=_0x55db8c[_0xf779('0x2')];}else{_0x2662ec[_0xf779('0x4')]=_0x55db8c[_0xf779('0x5')][_0xf779('0x4')];_0x2662ec['port']=_0x55db8c[_0xf779('0x5')]['port'];_0x2662ec[_0xf779('0x6')]=_0x55db8c[_0xf779('0x5')][_0xf779('0x6')];}if(_0x55db8c[_0xf779('0x5')]['authentication']){if(_0x55db8c[_0xf779('0x5')][_0xf779('0x7')]){if(!_0x55db8c['Smtp'][_0xf779('0x8')])throw new Error(_0xf779('0x9'));_0x2662ec[_0xf779('0xa')]={'type':_0xf779('0xb'),'user':_0x55db8c[_0xf779('0x5')][_0xf779('0xc')],'accessToken':_0x55db8c[_0xf779('0x5')][_0xf779('0x8')][_0xf779('0xd')]};}else{_0x2662ec['auth']={'user':_0x55db8c[_0xf779('0x5')][_0xf779('0xc')],'pass':_0x55db8c[_0xf779('0x5')][_0xf779('0xe')]};}}return _0x2662ec;}}});}; \ No newline at end of file