aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/mod.rs')
-rw-r--r--src/api/mod.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/api/mod.rs b/src/api/mod.rs
index 3f60cd6..1f178e7 100644
--- a/src/api/mod.rs
+++ b/src/api/mod.rs
@@ -49,6 +49,7 @@ pub(crate) fn router(
"/store/{*key}",
get(store::get_store_entry)
.put(store::put_store_entry)
+ .post(store::post_store_entry)
.delete(store::delete_store_entry),
)
.route("/stream", get(store::stream_store_root))
@@ -197,6 +198,7 @@ pub(crate) fn store_status(error: StoreError, context: &str) -> StatusCode {
match error {
StoreError::Conflict => StatusCode::CONFLICT,
StoreError::NotFound => StatusCode::NOT_FOUND,
+ StoreError::NotAList | StoreError::PastTheEnd { .. } => StatusCode::CONFLICT,
other => {
error!(error = %format!("{other:#}"), "{context}");
StatusCode::INTERNAL_SERVER_ERROR