From 429da306ee70a21169220dd365bf77886dc86dcb Mon Sep 17 00:00:00 2001 From: Tyler Murphy Date: Fri, 3 Feb 2023 11:42:32 -0500 Subject: [PATCH] favicon fix / readme --- README.md | 1 + src/public/file.rs | 4 ++++ src/public/mod.rs | 1 + 3 files changed, 6 insertions(+) diff --git a/README.md b/README.md index 0dfb9d2..d31d85d 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ now with xssbook you can run as much stallman disapprovement as you want - api calls dont care what you send them as long as they are valid strings - /console page to see everyones amazing api calls - /admin page for adnim things +- /api for api documentation **installation** diff --git a/src/public/file.rs b/src/public/file.rs index 7c118a6..88b45b8 100644 --- a/src/public/file.rs +++ b/src/public/file.rs @@ -27,6 +27,10 @@ pub async fn image(Path(path): Path) -> Response { super::serve(&path).await } +pub async fn favicon() -> Response { + super::serve("/favicon.ico").await +} + #[derive(Deserialize)] pub struct AvatarRequest { user_id: u64, diff --git a/src/public/mod.rs b/src/public/mod.rs index eb846fb..ebd5fc5 100644 --- a/src/public/mod.rs +++ b/src/public/mod.rs @@ -33,6 +33,7 @@ pub fn router() -> Router { Router::new() .nest("/", pages::router()) + .route("/favicon.ico",get(file::favicon)) .route("/js/*path", get(file::js)) .route("/css/*path", get(file::css)) .route("/fonts/*path", get(file::fonts))