diff options
author | Alex Auvolat <alex@adnab.me> | 2022-05-12 11:21:23 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-05-12 11:21:23 +0200 |
commit | ed768935815851a7e4b8880f0cb8fc91e35e3027 (patch) | |
tree | c11fa9987ceec56a4e6aac21e427211e669ef8c5 /src/api/admin/api_server.rs | |
parent | fc2f73ddb5ecaca250daa7b034fe59fb8c47f570 (diff) | |
download | garage-ed768935815851a7e4b8880f0cb8fc91e35e3027.tar.gz garage-ed768935815851a7e4b8880f0cb8fc91e35e3027.zip |
Simplify
Diffstat (limited to 'src/api/admin/api_server.rs')
-rw-r--r-- | src/api/admin/api_server.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/api/admin/api_server.rs b/src/api/admin/api_server.rs index 6bdef56c..b3bc9221 100644 --- a/src/api/admin/api_server.rs +++ b/src/api/admin/api_server.rs @@ -148,8 +148,12 @@ impl ApiHandler for AdminApiServer { Endpoint::CreateBucket => handle_create_bucket(&self.garage, req).await, Endpoint::DeleteBucket { id } => handle_delete_bucket(&self.garage, id).await, // Bucket-key permissions - Endpoint::BucketAllowKey => handle_bucket_allow_key(&self.garage, req).await, - Endpoint::BucketDenyKey => handle_bucket_deny_key(&self.garage, req).await, + Endpoint::BucketAllowKey => { + handle_bucket_change_key_perm(&self.garage, req, true).await + } + Endpoint::BucketDenyKey => { + handle_bucket_change_key_perm(&self.garage, req, false).await + } _ => Err(Error::NotImplemented(format!( "Admin endpoint {} not implemented yet", endpoint.name() |