Skip to content

Commit

Permalink
Fixed invite creation with doing a lowercase of the role.
Browse files Browse the repository at this point in the history
  • Loading branch information
SamTV12345 committed Oct 14, 2023
1 parent 5f9e88b commit 3b1d7b4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ui/src/components/CreateInviteModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ export const CreateInviteModal = () => {
</div>

<CustomButtonPrimary className="float-right" onClick={() => {
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]))
Expand Down

0 comments on commit 3b1d7b4

Please sign in to comment.