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