mirror of
https://github.com/Alvin-Zilverstand/nginx-proxy-manager.git
synced 2026-11-25 23:53:07 +01:00
Fix #5802 404 hosts disable missing async/await paradigm
This commit is contained in:
1 parent
046d3e022f
commit
2ed0c47de8
1 file changed
+4
-2
@@ -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}`);
|
||||||
|
|||||||
Reference in new issue
Block a user