Fix: Incorrect handling of status page not found

pull/4537/head
Nelson Chan 3 months ago
parent d88e7702b9
commit 62d174cce1
No known key found for this signature in database

@ -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);

Loading…
Cancel
Save