aboutsummaryrefslogtreecommitdiff
path: root/src/api/admin/key.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-06-13 16:15:50 +0200
committerAlex Auvolat <alex@adnab.me>2023-06-13 16:15:50 +0200
commitbf19a44fd93584d5250a2e98e5b1d3a2de6d59d1 (patch)
treea61816f3087a1ccc2e80ebfeb39e7e4634c97eb9 /src/api/admin/key.rs
parent7126f3e1d1fa7238788c23d01ec9f67b132e5f50 (diff)
downloadgarage-bf19a44fd93584d5250a2e98e5b1d3a2de6d59d1.tar.gz
garage-bf19a44fd93584d5250a2e98e5b1d3a2de6d59d1.zip
admin API: add missing camelCase conversions (fix #381)
Diffstat (limited to 'src/api/admin/key.rs')
-rw-r--r--src/api/admin/key.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/api/admin/key.rs b/src/api/admin/key.rs
index d74ca361..25ba76f8 100644
--- a/src/api/admin/key.rs
+++ b/src/api/admin/key.rs
@@ -34,6 +34,7 @@ pub async fn handle_list_keys(garage: &Arc<Garage>) -> Result<Response<Body>, Er
}
#[derive(Serialize)]
+#[serde(rename_all = "camelCase")]
struct ListKeyResultItem {
id: String,
name: String,
@@ -71,6 +72,7 @@ pub async fn handle_create_key(
}
#[derive(Deserialize)]
+#[serde(rename_all = "camelCase")]
struct CreateKeyRequest {
name: String,
}
@@ -131,6 +133,7 @@ pub async fn handle_update_key(
}
#[derive(Deserialize)]
+#[serde(rename_all = "camelCase")]
struct UpdateKeyRequest {
name: Option<String>,
allow: Option<KeyPerm>,
@@ -246,6 +249,7 @@ struct KeyInfoBucketResult {
}
#[derive(Serialize, Deserialize, Default)]
+#[serde(rename_all = "camelCase")]
pub(crate) struct ApiBucketKeyPerm {
#[serde(default)]
pub(crate) read: bool,