aboutsummaryrefslogtreecommitdiff
path: root/src/api/k2v
diff options
context:
space:
mode:
authorTobias Krischer <tobias.krischer@elyxon.de>2022-10-16 19:46:15 +0200
committerTobias Krischer <tobias.krischer@elyxon.de>2022-10-17 10:55:26 +0200
commit786500332341c8e39f7e3e82e493e567ecaa70e4 (patch)
tree805e6ca8d90d177410d1610f9086bab7194f8e6e /src/api/k2v
parent4582a8f34aba85ff7b0a56935f27cc166819dec1 (diff)
downloadgarage-786500332341c8e39f7e3e82e493e567ecaa70e4.tar.gz
garage-786500332341c8e39f7e3e82e493e567ecaa70e4.zip
Use status code 204 No Content for empty responses
Diffstat (limited to 'src/api/k2v')
-rw-r--r--src/api/k2v/batch.rs2
-rw-r--r--src/api/k2v/item.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/api/k2v/batch.rs b/src/api/k2v/batch.rs
index db9901cf..78035362 100644
--- a/src/api/k2v/batch.rs
+++ b/src/api/k2v/batch.rs
@@ -42,7 +42,7 @@ pub async fn handle_insert_batch(
garage.k2v.rpc.insert_batch(bucket_id, items2).await?;
Ok(Response::builder()
- .status(StatusCode::OK)
+ .status(StatusCode::NO_CONTENT)
.body(Body::empty())?)
}
diff --git a/src/api/k2v/item.rs b/src/api/k2v/item.rs
index 836d386f..f85138c7 100644
--- a/src/api/k2v/item.rs
+++ b/src/api/k2v/item.rs
@@ -153,7 +153,7 @@ pub async fn handle_insert_item(
.await?;
Ok(Response::builder()
- .status(StatusCode::OK)
+ .status(StatusCode::NO_CONTENT)
.body(Body::empty())?)
}