mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-09-19 16:24:09 +01:00
Fix #5802 404 hosts disable missing async/await paradigm
This commit is contained in:
@@ -194,9 +194,11 @@ router
|
||||
/**
|
||||
* POST /api/nginx/dead-hosts/123/disable
|
||||
*/
|
||||
.post((req, res, next) => {
|
||||
.post(async (req, res, next) => {
|
||||
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);
|
||||
} catch (err) {
|
||||
debug(logger, `${req.method.toUpperCase()} ${req.path}: ${err}`);
|
||||
|
||||
Reference in New Issue
Block a user