diff --git a/src/routes/assets.rs b/src/routes/assets.rs index 31a87d5..48e8a73 100644 --- a/src/routes/assets.rs +++ b/src/routes/assets.rs @@ -59,14 +59,14 @@ static ASSETS: LazyLock> = LazyLock::new(|| { assets }); -#[get("/assets/{name}")] -pub async fn handler(name: web::Path) -> HttpResponse { - let name = name.into_inner(); +#[get("/assets/{path}")] +pub async fn handler(path: web::Path) -> HttpResponse { + let path = path.into_inner(); - if let Some(body) = ASSETS.get(&name) { + if let Some(body) = ASSETS.get(&path) { HttpResponse::Ok() .content_type( - mime_guess::from_path(&name) + mime_guess::from_path(&path) .first_or_octet_stream() .essence_str(), )