diff options
author | Tyler Murphy <tylerm@tylerm.dev> | 2023-04-05 23:08:09 -0400 |
---|---|---|
committer | Tyler Murphy <tylerm@tylerm.dev> | 2023-04-05 23:08:09 -0400 |
commit | bb85374b79086cd8efde24d23a1bffeb97cae26b (patch) | |
tree | a36e2df6a89e567822820ac110afec6a13eacbf6 /src/web/file.rs | |
parent | finish dns and start webserver (diff) | |
download | wrapper-bb85374b79086cd8efde24d23a1bffeb97cae26b.tar.gz wrapper-bb85374b79086cd8efde24d23a1bffeb97cae26b.tar.bz2 wrapper-bb85374b79086cd8efde24d23a1bffeb97cae26b.zip |
new c version
Diffstat (limited to 'src/web/file.rs')
-rw-r--r-- | src/web/file.rs | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/web/file.rs b/src/web/file.rs deleted file mode 100644 index 73ecdc9..0000000 --- a/src/web/file.rs +++ /dev/null @@ -1,31 +0,0 @@ -use axum::{extract::Path, response::Response}; - -use super::http::serve; - -pub async fn js(Path(path): Path<String>) -> Response { - let path = format!("/js/{path}"); - serve(&path).await -} - -pub async fn css(Path(path): Path<String>) -> Response { - let path = format!("/css/{path}"); - serve(&path).await -} - -pub async fn fonts(Path(path): Path<String>) -> Response { - let path = format!("/fonts/{path}"); - serve(&path).await -} - -pub async fn image(Path(path): Path<String>) -> Response { - let path = format!("/image/{path}"); - serve(&path).await -} - -pub async fn favicon() -> Response { - serve("/favicon.ico").await -} - -pub async fn robots() -> Response { - serve("/robots.txt").await -} |