From 3b1d7b4ae522228da728fb051a6269861167533d Mon Sep 17 00:00:00 2001 From: SamTV12345 <40429738+samtv12345@users.noreply.github.com> Date: Sat, 14 Oct 2023 23:18:18 +0200 Subject: [PATCH] Fixed invite creation with doing a lowercase of the role. --- ui/src/components/CreateInviteModal.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/src/components/CreateInviteModal.tsx b/ui/src/components/CreateInviteModal.tsx index 815024e5..e394aa5f 100644 --- a/ui/src/components/CreateInviteModal.tsx +++ b/ui/src/components/CreateInviteModal.tsx @@ -57,7 +57,11 @@ export const CreateInviteModal = () => { { - axios.post(apiURL + '/users/invites', invite) + const modifiedInvite = { + role: invite.role.toLowerCase(), + explicitConsent: invite.explicitConsent + } satisfies Invite + axios.post(apiURL + '/users/invites', modifiedInvite) .then((v) => { enqueueSnackbar(t('invite-created'), { variant: 'success' }) dispatch(setInvites([...invites,v.data]))