summaryrefslogtreecommitdiff
path: root/src/ui/handlers/asset.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/handlers/asset.rs')
-rw-r--r--src/ui/handlers/asset.rs11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/ui/handlers/asset.rs b/src/ui/handlers/asset.rs
index 1d5b8be..948d6d6 100644
--- a/src/ui/handlers/asset.rs
+++ b/src/ui/handlers/asset.rs
@@ -1,7 +1,12 @@
use axum::extract::Path;
+use axum_extra::TypedHeader;
+use headers::IfNoneMatch;
-use crate::ui::assets::{Asset, Assets, Error};
+use crate::ui::assets::{Error, Response};
-pub async fn handler(Path(path): Path<String>) -> Result<Asset, Error> {
- Assets::load(path)
+pub async fn handler(
+ Path(path): Path<String>,
+ TypedHeader(if_none_match): TypedHeader<IfNoneMatch>,
+) -> Result<Response, Error> {
+ Response::load(&path, &if_none_match)
}