mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-27 16:54:04 +00:00
Fix: Incorrect handling of status page not found (#4537)
This commit is contained in:
parent
d88e7702b9
commit
c7b8bb9e4a
1 changed files with 1 additions and 5 deletions
|
@ -40,16 +40,12 @@ router.get("/api/status-page/:slug", cache("5 minutes"), async (request, respons
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if (!statusPage) {
|
if (!statusPage) {
|
||||||
|
sendHttpError(response, "Status Page Not Found");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
let statusPageData = await StatusPage.getStatusPageData(statusPage);
|
let statusPageData = await StatusPage.getStatusPageData(statusPage);
|
||||||
|
|
||||||
if (!statusPageData) {
|
|
||||||
sendHttpError(response, "Not Found");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Response
|
// Response
|
||||||
response.json(statusPageData);
|
response.json(statusPageData);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue