Fix trivial bug in CLI
continuous-integration/drone/pr Build is failing Details
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Alex 2022-01-10 12:38:33 +01:00
parent 8f39360f22
commit 17ea28a438
No known key found for this signature in database
GPG Key ID: EDABF9711E244EB1
1 changed files with 6 additions and 2 deletions

View File

@ -531,7 +531,9 @@ impl AdminRpcHandler {
.bucket_helper()
.get_existing_matching_key(&query.key_pattern)
.await?;
key.params_mut().unwrap().allow_create_bucket.update(true);
if query.create_bucket {
key.params_mut().unwrap().allow_create_bucket.update(true);
}
self.garage.key_table.insert(&key).await?;
self.key_info_result(key).await
}
@ -542,7 +544,9 @@ impl AdminRpcHandler {
.bucket_helper()
.get_existing_matching_key(&query.key_pattern)
.await?;
key.params_mut().unwrap().allow_create_bucket.update(false);
if query.create_bucket {
key.params_mut().unwrap().allow_create_bucket.update(false);
}
self.garage.key_table.insert(&key).await?;
self.key_info_result(key).await
}