From b7c46a9c0997c678ce72e0c2209587b5781ff49b Mon Sep 17 00:00:00 2001 From: RGBCube Date: Tue, 9 Jan 2024 00:40:37 +0300 Subject: [PATCH] Fix 404 page --- src/routes/assets.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/assets.rs b/src/routes/assets.rs index 764d009..5310be5 100644 --- a/src/routes/assets.rs +++ b/src/routes/assets.rs @@ -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) -> Response { } 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() } }