fix validation error

This commit is contained in:
Christie Molloy 2020-10-05 15:45:06 -04:00
parent a405dc9e13
commit eb57faf826

View file

@ -41,8 +41,9 @@ export const GroupsCreateModal = ({
};
const submitForm = async () => {
if (await form.trigger()) {
try {
await httpClient.doPost(`/admin/realms/${realm}/groups`, {
httpClient.doPost(`/admin/realms/${realm}/groups`, {
name: createGroupName,
});
setIsCreateModalOpen(false);
@ -51,6 +52,7 @@ export const GroupsCreateModal = ({
} catch (error) {
add(`${t("couldNotCreateGroup")} ': '${error}'`, AlertVariant.danger);
}
}
};
return (