Fix #5802 404 hosts disable missing async/await paradigm

This commit is contained in:
Jamie Curnow committed 2026-08-26 08:02:52 +10:00
1 parent 046d3e022f
commit 2ed0c47de8
1 file changed
+4 -2
+4 -2
View File
@@ -194,9 +194,11 @@ router
/** /**
* POST /api/nginx/dead-hosts/123/disable * POST /api/nginx/dead-hosts/123/disable
*/ */
.post((req, res, next) => { .post(async (req, res, next) => {
try { try {
const result = internalDeadHost.disable(res.locals.access, { id: Number.parseInt(req.params.host_id, 10) }); const result = await internalDeadHost.disable(res.locals.access, {
id: Number.parseInt(req.params.host_id, 10),
});
res.status(200).send(result); res.status(200).send(result);
} catch (err) { } catch (err) {
debug(logger, `${req.method.toUpperCase()} ${req.path}: ${err}`); debug(logger, `${req.method.toUpperCase()} ${req.path}: ${err}`);