fix: cannot disable user
This commit is contained in:
parent
d08e4fe6d3
commit
5d6b61b46f
1 changed files with 2 additions and 2 deletions
|
|
@ -75,7 +75,7 @@ export async function createUser(username: string, password: string, opts?: Reco
|
|||
},
|
||||
method: "POST",
|
||||
body: JSON.stringify({
|
||||
enabled: true,
|
||||
enabled: opts?.enabled !== undefined ? opts.enabled : true,
|
||||
credentials: [{ type: "password", value: password }],
|
||||
username,
|
||||
...opts,
|
||||
|
|
@ -110,7 +110,7 @@ export async function editUser(userId: string, opts: Record<string, any>) {
|
|||
},
|
||||
method: "PUT",
|
||||
body: JSON.stringify({
|
||||
enabled: true,
|
||||
enabled: opts?.enabled !== undefined ? opts.enabled : true,
|
||||
credentials: (password && [{ type: "password", value: opts?.password }]) || undefined,
|
||||
...rest,
|
||||
}),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue