settings: move mailFqdn/Domain into mailServer

This commit is contained in:
Girish Ramakrishnan
2023-08-04 21:37:38 +05:30
parent 946e5caacb
commit 4cdf37b060
15 changed files with 78 additions and 73 deletions

View File

@@ -78,7 +78,7 @@ async function setLocation(req, res, next) {
if (typeof req.body.domain !== 'string') return next(new HttpError(400, 'domain must be a string'));
if (typeof req.body.subdomain !== 'string') return next(new HttpError(400, 'subdomain must be a string'));
const [error, taskId] = await safe(mailServer.setLocation(req.body.subdomain, req.body.domain, AuditSource.fromRequest(req)));
const [error, taskId] = await safe(mailServer.startChangeLocation(req.body.subdomain, req.body.domain, AuditSource.fromRequest(req)));
if (error) return next(BoxError.toHttpError(error));
next(new HttpSuccess(202, { taskId }));