make 404 page status code actually 404

This commit is contained in:
2025-09-24 16:28:14 +02:00
parent a36f2c86a7
commit c6f1f30dab

View File

@@ -13,7 +13,7 @@ struct PageNotFound;
pub async fn page_notfound() -> Response { pub async fn page_notfound() -> Response {
let a = PageNotFound; let a = PageNotFound;
match a.render() { match a.render() {
Ok(res) => (StatusCode::OK, Html(res)).into_response(), Ok(res) => (StatusCode::NOT_FOUND, Html(res)).into_response(),
Err(_e) => (StatusCode::INTERNAL_SERVER_ERROR, INTERNAL_SERVER_ERROR_MSG).into_response(), Err(_e) => (StatusCode::INTERNAL_SERVER_ERROR, INTERNAL_SERVER_ERROR_MSG).into_response(),
} }
} }