aboutsummaryrefslogtreecommitdiff
path: root/src/api/admin/key.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2024-02-22 15:45:45 +0100
committerAlex Auvolat <alex@adnab.me>2024-02-22 15:45:45 +0100
commit59f61c966ae5fbc9442a5fc179ad55b7370b6892 (patch)
tree1149518e5feb0a7bc101992d8a0a3cf430cb9039 /src/api/admin/key.rs
parent75e591727d9cfda0133200604872a38419c178a1 (diff)
parent74d0c47f21ae2f9998a7dcbca3a27e3cc51e70b6 (diff)
downloadgarage-59f61c966ae5fbc9442a5fc179ad55b7370b6892.tar.gz
garage-59f61c966ae5fbc9442a5fc179ad55b7370b6892.zip
Merge branch 'main' into next-0.10
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 1efaca16..291b6d54 100644
--- a/src/api/admin/key.rs
+++ b/src/api/admin/key.rs
@@ -151,11 +151,11 @@ pub async fn handle_delete_key(
garage: &Arc<Garage>,
id: String,
) -> Result<Response<ResBody>, Error> {
- let mut key = garage.key_helper().get_existing_key(&id).await?;
+ let helper = garage.locked_helper().await;
- key.state.as_option().unwrap();
+ let mut key = helper.key().get_existing_key(&id).await?;
- garage.key_helper().delete_key(&mut key).await?;
+ helper.delete_key(&mut key).await?;
Ok(Response::builder()
.status(StatusCode::NO_CONTENT)