forked from open-webui/open-webui
feat: add user from admin panel
This commit is contained in:
parent
96af34f240
commit
e6bcdba5ad
5 changed files with 36 additions and 8 deletions
|
@ -100,14 +100,15 @@ export const addUser = async (
|
|||
name: string,
|
||||
email: string,
|
||||
password: string,
|
||||
role: string
|
||||
role: string = 'pending'
|
||||
) => {
|
||||
let error = null;
|
||||
|
||||
const res = await fetch(`${WEBUI_API_BASE_URL}/auths/add`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
'Content-Type': 'application/json',
|
||||
...(token && { authorization: `Bearer ${token}` })
|
||||
},
|
||||
body: JSON.stringify({
|
||||
name: name,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue