make 404 page status code actually 404
This commit is contained in:
@@ -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(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user