diff --git a/src/http/routers/v1.rs b/src/http/routers/v1.rs index 1cca1e7fa..7e7027573 100644 --- a/src/http/routers/v1.rs +++ b/src/http/routers/v1.rs @@ -3,6 +3,7 @@ use axum::Extension; use axum::Router; use axum::routing::get; use axum::routing::post; +use axum::routing::delete; use futures::Future; use hyper::Body; use hyper::Response; @@ -128,7 +129,7 @@ pub fn make_v1_router() -> Router { .route("/integrations-filtered/:integr_name", get(handle_v1_integrations_filtered)) .route("/integration-get", telemetry_post!(handle_v1_integration_get)) .route("/integration-save", telemetry_post!(handle_v1_integration_save)) - .route("/integration-delete", get(handle_v1_integration_delete)) + .route("/integration-delete", delete(handle_v1_integration_delete)) .route("/integration-icon/:icon_name", get(handle_v1_integration_icon)) .route("/docker-container-list", telemetry_post!(handle_v1_docker_container_list)) diff --git a/src/http/routers/v1/v1_integrations.rs b/src/http/routers/v1/v1_integrations.rs index 35ce6462d..455f3c973 100644 --- a/src/http/routers/v1/v1_integrations.rs +++ b/src/http/routers/v1/v1_integrations.rs @@ -176,6 +176,7 @@ pub async fn handle_v1_integration_delete( Ok(Response::builder() .status(StatusCode::OK) - .body(Body::from(format!("File {} deleted ", integration_path))) + .header("Content-Type", "application/json") + .body(Body::from(format!(""))) .unwrap()) }