From b35196fc12b0775d6a8c14b8877ad8cc547de1b7 Mon Sep 17 00:00:00 2001 From: Aleh Zasypkin Date: Mon, 30 Oct 2023 08:54:46 +0100 Subject: [PATCH] fix(certificates): fix response format for "get certificate template" endpoint --- src/utils/certificates.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils/certificates.rs b/src/utils/certificates.rs index ae7ecc4..7283282 100644 --- a/src/utils/certificates.rs +++ b/src/utils/certificates.rs @@ -97,7 +97,7 @@ pub async fn certificates_handle_action( UtilsActionResult::json(json!({ "template": template, - "user_share": users + "userShare": users .get_user_share_by_resource( user.id, &SharedResource::certificate_template(resource_id), @@ -533,6 +533,7 @@ pub mod tests { } #[derive(Deserialize)] + #[serde(rename_all = "camelCase")] struct TemplateWrapper { template: CertificateTemplate, user_share: Option,