fixed creating new ldap settings
This commit is contained in:
parent
f73c9afdd8
commit
c87196cfd1
1 changed files with 5 additions and 7 deletions
|
@ -211,14 +211,12 @@ export const UserFederationLdapSettings = () => {
|
||||||
|
|
||||||
const save = async (component: ComponentRepresentation) => {
|
const save = async (component: ComponentRepresentation) => {
|
||||||
try {
|
try {
|
||||||
if (id) {
|
if (!id) {
|
||||||
if (id === "new") {
|
|
||||||
await adminClient.components.create(component);
|
await adminClient.components.create(component);
|
||||||
history.push(`/${realm}/user-federation`);
|
history.push(`/${realm}/user-federation`);
|
||||||
} else {
|
} else {
|
||||||
await adminClient.components.update({ id }, component);
|
await adminClient.components.update({ id }, component);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
setupForm(component as ComponentRepresentation);
|
setupForm(component as ComponentRepresentation);
|
||||||
addAlert(
|
addAlert(
|
||||||
t(id === "new" ? "createSuccess" : "saveSuccess"),
|
t(id === "new" ? "createSuccess" : "saveSuccess"),
|
||||||
|
|
Loading…
Reference in a new issue