improve add account flow

This commit is contained in:
grimhilt
2023-07-16 16:24:30 +02:00
parent f40b6758de
commit ae73326820
8 changed files with 29 additions and 24 deletions

View File

@@ -12,10 +12,10 @@ export default class Account {
}
static async register(body, res: Response) {
const { email, pwd, xoauth, xoauth2, host, port, tls } = body;
const { email, pwd, xoauth, xoauth2, imapHost, smtpHost, imapPort, smtpPort, tls } = body;
getAddressId(email).then((addressId) => {
registerAccount(addressId, pwd, xoauth, xoauth2, host, port, tls)
.then((mailboxId) => {
registerAccount(addressId, pwd, xoauth, xoauth2, imapHost, smtpHost, imapPort, smtpPort, tls)
.then((mailboxId) => {0
res.status(statusCodes.OK).json({ id: mailboxId });
})
.catch(() => {