aboutsummaryrefslogtreecommitdiff
path: root/src/api/admin/key.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2024-02-05 19:27:12 +0100
committerAlex Auvolat <alex@adnab.me>2024-02-05 19:27:12 +0100
commita22bd319202f05bce4ad13072238c7ba81d518fb (patch)
tree817d90efaeaa51ea8aebaf5b25ad56c8b968dc0c /src/api/admin/key.rs
parent0bb5b77530ad432e4c77f13b395fe74613812337 (diff)
downloadgarage-a22bd319202f05bce4ad13072238c7ba81d518fb.tar.gz
garage-a22bd319202f05bce4ad13072238c7ba81d518fb.zip
[dep-upgrade-202402] migration to http/hyper 1.0 for k2v api
Diffstat (limited to 'src/api/admin/key.rs')
-rw-r--r--src/api/admin/key.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/api/admin/key.rs b/src/api/admin/key.rs
index 3e5d2cab..1efaca16 100644
--- a/src/api/admin/key.rs
+++ b/src/api/admin/key.rs
@@ -65,7 +65,7 @@ pub async fn handle_create_key(
garage: &Arc<Garage>,
req: Request<IncomingBody>,
) -> Result<Response<ResBody>, Error> {
- let req = parse_json_body::<CreateKeyRequest>(req).await?;
+ let req = parse_json_body::<CreateKeyRequest, _, Error>(req).await?;
let key = Key::new(req.name.as_deref().unwrap_or("Unnamed key"));
garage.key_table.insert(&key).await?;
@@ -83,7 +83,7 @@ pub async fn handle_import_key(
garage: &Arc<Garage>,
req: Request<IncomingBody>,
) -> Result<Response<ResBody>, Error> {
- let req = parse_json_body::<ImportKeyRequest>(req).await?;
+ let req = parse_json_body::<ImportKeyRequest, _, Error>(req).await?;
let prev_key = garage.key_table.get(&EmptyKey, &req.access_key_id).await?;
if prev_key.is_some() {
@@ -114,7 +114,7 @@ pub async fn handle_update_key(
id: String,
req: Request<IncomingBody>,
) -> Result<Response<ResBody>, Error> {
- let req = parse_json_body::<UpdateKeyRequest>(req).await?;
+ let req = parse_json_body::<UpdateKeyRequest, _, Error>(req).await?;
let mut key = garage.key_helper().get_existing_key(&id).await?;