diff options
| author | tv <tv@krebsco.de> | 2026-10-30 20:34:47 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-30 20:34:47 +0100 |
| commit | a29a38db0ad7fc8d42a533145c8a489d97702fb5 (patch) | |
| tree | ae1689804484d2aceabf106bb82cd4f0fcf97b36 /src/api/mod.rs | |
| parent | caf212f916ce8fb31d7dba8bbe6d537092d324d5 (diff) | |
add support to insert values at list index
Diffstat (limited to 'src/api/mod.rs')
| -rw-r--r-- | src/api/mod.rs | 2 |
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 |
