use actix_web::{http::header::LOCATION, web, HttpResponse, Responder}; use sqlx::PgPool; use crate::{endpoints::IdPath, models::User, utils::ApplicationError}; #[actix_web::delete("/locations/delete/{id}")] pub async fn delete ( user: web::ReqData, pool: web::Data, path: web::Path ) -> Result { Ok(HttpResponse::Found() .insert_header((LOCATION, "/locations")) .insert_header(("HX-LOCATION", "/locations")) .finish()) }