merge appdb.js into apps.js
This commit is contained in:
@@ -275,14 +275,13 @@ async function updateDashboardDomain(req, res, next) {
|
||||
next(new HttpSuccess(204, {}));
|
||||
}
|
||||
|
||||
function prepareDashboardDomain(req, res, next) {
|
||||
async function prepareDashboardDomain(req, res, next) {
|
||||
if (!req.body.domain || typeof req.body.domain !== 'string') return next(new HttpError(400, 'domain must be a string'));
|
||||
|
||||
cloudron.prepareDashboardDomain(req.body.domain, auditSource.fromRequest(req), function (error, taskId) {
|
||||
if (error) return next(BoxError.toHttpError(error));
|
||||
const [error, taskId] = await safe(cloudron.prepareDashboardDomain(req.body.domain, auditSource.fromRequest(req)));
|
||||
if (error) return next(BoxError.toHttpError(error));
|
||||
|
||||
next(new HttpSuccess(202, { taskId }));
|
||||
});
|
||||
next(new HttpSuccess(202, { taskId }));
|
||||
}
|
||||
|
||||
async function renewCerts(req, res, next) {
|
||||
|
||||
Reference in New Issue
Block a user