This commit is contained in:
Christie Molloy 2020-10-06 10:36:09 -04:00
parent bcffc68fdc
commit 64969fac0b

View file

@ -42,18 +42,18 @@ export const GroupsCreateModal = ({
const submitForm = async () => {
if (await form.trigger()) {
try {
httpClient.doPost(`/admin/realms/${realm}/groups`, {
name: createGroupName,
});
setIsCreateModalOpen(false);
setCreateGroupName("");
add(t("groupCreated"), AlertVariant.success);
} catch (error) {
add(`${t("couldNotCreateGroup")} ': '${error}'`, AlertVariant.danger);
try {
httpClient.doPost(`/admin/realms/${realm}/groups`, {
name: createGroupName,
});
setIsCreateModalOpen(false);
setCreateGroupName("");
add(t("groupCreated"), AlertVariant.success);
} catch (error) {
add(`${t("couldNotCreateGroup")} ': '${error}'`, AlertVariant.danger);
}
}
}
};
};
return (
<React.Fragment>