merge settingsdb into settings code

This commit is contained in:
Girish Ramakrishnan
2021-08-19 13:24:38 -07:00
parent 4cd5137292
commit 411cc7daa1
25 changed files with 332 additions and 578 deletions
+4 -5
View File
@@ -266,14 +266,13 @@ function getLogStream(req, res, next) {
});
}
function updateDashboardDomain(req, res, next) {
async function updateDashboardDomain(req, res, next) {
if (!req.body.domain || typeof req.body.domain !== 'string') return next(new HttpError(400, 'domain must be a string'));
cloudron.updateDashboardDomain(req.body.domain, auditSource.fromRequest(req), function (error) {
if (error) return next(BoxError.toHttpError(error));
const [error] = await safe(cloudron.updateDashboardDomain(req.body.domain, auditSource.fromRequest(req)));
if (error) return next(BoxError.toHttpError(error));
next(new HttpSuccess(204, {}));
});
next(new HttpSuccess(204, {}));
}
function prepareDashboardDomain(req, res, next) {