mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-16 03:47:49 +01:00
feat: add user from admin panel
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user