1
Fork 0
mirror of https://github.com/RGBCube/Site synced 2025-08-01 13:37:49 +00:00

Fix 404 page

This commit is contained in:
RGBCube 2024-01-09 00:40:37 +03:00
parent 7ffe78fa2d
commit b7c46a9c09
No known key found for this signature in database

View file

@ -10,7 +10,6 @@ use axum::{
http::{
header::CONTENT_TYPE,
Response,
StatusCode,
},
response::IntoResponse,
};
@ -18,6 +17,7 @@ use bytes::Bytes;
use super::markdown::PAGES;
use crate::{
errors::not_found,
minify,
page::{
text,
@ -88,6 +88,6 @@ pub async fn handler(Path(path): Path<String>) -> Response<Body> {
} else if let Some((metadata, body)) = PAGES.get(&path) {
text::create(Some(&metadata.title), Page::from_str(&path), body).into_response()
} else {
StatusCode::NOT_FOUND.into_response()
not_found::handler().await.into_response()
}
}