Fix: Incorrect handling of status page not found (#4537)

This commit is contained in:
Nelson Chan 2024-02-28 18:57:58 +08:00 committed by GitHub
parent d88e7702b9
commit c7b8bb9e4a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 5 deletions

View File

@ -40,16 +40,12 @@ router.get("/api/status-page/:slug", cache("5 minutes"), async (request, respons
]);
if (!statusPage) {
sendHttpError(response, "Status Page Not Found");
return null;
}
let statusPageData = await StatusPage.getStatusPageData(statusPage);
if (!statusPageData) {
sendHttpError(response, "Not Found");
return;
}
// Response
response.json(statusPageData);