diff options
author | Alex Auvolat <alex@adnab.me> | 2023-06-14 17:13:41 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2023-06-14 17:19:25 +0200 |
commit | 8ef42c9609bcefc642cc9739acb921dffba49b89 (patch) | |
tree | 5d479c3ad3951d5d44cea5c2e033b506733c4f0f /src/api/admin/key.rs | |
parent | a83a092c032058728f191119de99f38844aa74f5 (diff) | |
download | garage-8ef42c9609bcefc642cc9739acb921dffba49b89.tar.gz garage-8ef42c9609bcefc642cc9739acb921dffba49b89.zip |
admin docs: reformatting, key admin: add check
Diffstat (limited to 'src/api/admin/key.rs')
-rw-r--r-- | src/api/admin/key.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/api/admin/key.rs b/src/api/admin/key.rs index 0d1f799b..8d1c6890 100644 --- a/src/api/admin/key.rs +++ b/src/api/admin/key.rs @@ -93,7 +93,8 @@ pub async fn handle_import_key( &req.access_key_id, &req.secret_access_key, req.name.as_deref().unwrap_or("Imported key"), - ); + ) + .ok_or_bad_request("Invalid key format")?; garage.key_table.insert(&imported_key).await?; key_info_results(garage, imported_key, false).await |