diff --git a/src/router/download.rs b/src/router/download.rs index ccc34aa..e5311d6 100644 --- a/src/router/download.rs +++ b/src/router/download.rs @@ -1,7 +1,6 @@ use axum::{ body::Body, extract::State, - http::HeaderMap, response::{IntoResponse, Redirect}, routing::get, Router, @@ -17,19 +16,9 @@ pub fn get_download_router() -> Router { async fn download( axum::extract::Path(id): axum::extract::Path, - headers: HeaderMap, State(state): State, ) -> Result { { - if headers.get("hx-request").is_some() { - return Ok(axum::http::Response::builder() - .header("HX-Redirect", format!("/download/{id}")) - .status(204) - .body("".to_owned()) - .unwrap() - .into_response()); - } - let mut records = state.records.lock().await; if let Some(record) = records .get_mut(&id)