mirror of
https://github.com/RGBCube/Site
synced 2025-08-02 05:57:46 +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::{
|
http::{
|
||||||
header::CONTENT_TYPE,
|
header::CONTENT_TYPE,
|
||||||
Response,
|
Response,
|
||||||
StatusCode,
|
|
||||||
},
|
},
|
||||||
response::IntoResponse,
|
response::IntoResponse,
|
||||||
};
|
};
|
||||||
|
@ -18,6 +17,7 @@ use bytes::Bytes;
|
||||||
|
|
||||||
use super::markdown::PAGES;
|
use super::markdown::PAGES;
|
||||||
use crate::{
|
use crate::{
|
||||||
|
errors::not_found,
|
||||||
minify,
|
minify,
|
||||||
page::{
|
page::{
|
||||||
text,
|
text,
|
||||||
|
@ -88,6 +88,6 @@ pub async fn handler(Path(path): Path<String>) -> Response<Body> {
|
||||||
} else if let Some((metadata, body)) = PAGES.get(&path) {
|
} else if let Some((metadata, body)) = PAGES.get(&path) {
|
||||||
text::create(Some(&metadata.title), Page::from_str(&path), body).into_response()
|
text::create(Some(&metadata.title), Page::from_str(&path), body).into_response()
|
||||||
} else {
|
} else {
|
||||||
StatusCode::NOT_FOUND.into_response()
|
not_found::handler().await.into_response()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue