diff options
author | Alex Auvolat <alex@adnab.me> | 2024-02-22 15:45:45 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2024-02-22 15:45:45 +0100 |
commit | 59f61c966ae5fbc9442a5fc179ad55b7370b6892 (patch) | |
tree | 1149518e5feb0a7bc101992d8a0a3cf430cb9039 /src/garage/admin/key.rs | |
parent | 75e591727d9cfda0133200604872a38419c178a1 (diff) | |
parent | 74d0c47f21ae2f9998a7dcbca3a27e3cc51e70b6 (diff) | |
download | garage-59f61c966ae5fbc9442a5fc179ad55b7370b6892.tar.gz garage-59f61c966ae5fbc9442a5fc179ad55b7370b6892.zip |
Merge branch 'main' into next-0.10
Diffstat (limited to 'src/garage/admin/key.rs')
-rw-r--r-- | src/garage/admin/key.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/garage/admin/key.rs b/src/garage/admin/key.rs index 1c92670c..bd010d2c 100644 --- a/src/garage/admin/key.rs +++ b/src/garage/admin/key.rs @@ -76,9 +76,10 @@ impl AdminRpcHandler { } async fn handle_delete_key(&self, query: &KeyDeleteOpt) -> Result<AdminRpc, Error> { - let key_helper = self.garage.key_helper(); + let helper = self.garage.locked_helper().await; - let mut key = key_helper + let mut key = helper + .key() .get_existing_matching_key(&query.key_pattern) .await?; @@ -88,7 +89,7 @@ impl AdminRpcHandler { )); } - key_helper.delete_key(&mut key).await?; + helper.delete_key(&mut key).await?; Ok(AdminRpc::Ok(format!( "Key {} was deleted successfully.", |