From 786500332341c8e39f7e3e82e493e567ecaa70e4 Mon Sep 17 00:00:00 2001 From: Tobias Krischer Date: Sun, 16 Oct 2022 19:46:15 +0200 Subject: Use status code 204 No Content for empty responses --- src/api/admin/cluster.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/api/admin/cluster.rs') diff --git a/src/api/admin/cluster.rs b/src/api/admin/cluster.rs index 99c6e332..706db727 100644 --- a/src/api/admin/cluster.rs +++ b/src/api/admin/cluster.rs @@ -151,7 +151,7 @@ pub async fn handle_update_cluster_layout( garage.system.update_cluster_layout(&layout).await?; Ok(Response::builder() - .status(StatusCode::OK) + .status(StatusCode::NO_CONTENT) .body(Body::empty())?) } @@ -166,7 +166,7 @@ pub async fn handle_apply_cluster_layout( garage.system.update_cluster_layout(&layout).await?; Ok(Response::builder() - .status(StatusCode::OK) + .status(StatusCode::NO_CONTENT) .body(Body::empty())?) } @@ -181,7 +181,7 @@ pub async fn handle_revert_cluster_layout( garage.system.update_cluster_layout(&layout).await?; Ok(Response::builder() - .status(StatusCode::OK) + .status(StatusCode::NO_CONTENT) .body(Body::empty())?) } -- cgit v1.2.3