mirror of
https://github.com/RGBCube/Site
synced 2025-08-01 13:37:49 +00:00
Fix 404 page
This commit is contained in:
parent
7ffe78fa2d
commit
b7c46a9c09
1 changed files with 2 additions and 2 deletions
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue