From d85ccdf025ae0c49bcbe0cca31d0e7f0d945d10e Mon Sep 17 00:00:00 2001 From: Zynh Ludwig Date: Fri, 30 Aug 2024 23:15:35 -0700 Subject: [PATCH] remove unused header check --- src/router/download.rs | 11 ----------- 1 file changed, 11 deletions(-) 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)