fix
This commit is contained in:
parent
bed7dbb896
commit
a213d75c70
2 changed files with 13 additions and 11 deletions
|
|
@ -214,9 +214,9 @@ export async function updateName(
|
|||
userId: string,
|
||||
firstName: string,
|
||||
lastName: string,
|
||||
opts: Record<string, any>,
|
||||
// opts: Record<string, any>,
|
||||
) {
|
||||
const { password, ...rest } = opts;
|
||||
// const { password, ...rest } = opts;
|
||||
|
||||
const res = await fetch(`${KC_URL}/admin/realms/${KC_REALM}/users/${userId}`, {
|
||||
// prettier-ignore
|
||||
|
|
@ -227,13 +227,15 @@ export async function updateName(
|
|||
method: "PUT",
|
||||
body: JSON.stringify({
|
||||
enabled: true,
|
||||
credentials: (password && [{ type: "password", value: opts?.password }]) || undefined,
|
||||
...rest,
|
||||
// credentials: (password && [{ type: "password", value: opts?.password }]) || undefined,
|
||||
// ...rest,
|
||||
firstName,
|
||||
lastName,
|
||||
}),
|
||||
}).catch((e) => console.log("Keycloak Error: ", e));
|
||||
|
||||
console.log("firstName: ", firstName);
|
||||
console.log("lastName: ", lastName);
|
||||
|
||||
if (!res) return false;
|
||||
if (!res.ok) {
|
||||
// return Boolean(console.error("Keycloak Error Response: ", await res.json()));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue