refac: account details
This commit is contained in:
@@ -393,7 +393,7 @@ export const addUser = async (
|
||||
return res;
|
||||
};
|
||||
|
||||
export const updateUserProfile = async (token: string, name: string, profileImageUrl: string) => {
|
||||
export const updateUserProfile = async (token: string, profile: object) => {
|
||||
let error = null;
|
||||
|
||||
const res = await fetch(`${WEBUI_API_BASE_URL}/auths/update/profile`, {
|
||||
@@ -403,8 +403,7 @@ export const updateUserProfile = async (token: string, name: string, profileImag
|
||||
...(token && { authorization: `Bearer ${token}` })
|
||||
},
|
||||
body: JSON.stringify({
|
||||
name: name,
|
||||
profile_image_url: profileImageUrl
|
||||
...profile
|
||||
})
|
||||
})
|
||||
.then(async (res) => {
|
||||
|
||||
Reference in New Issue
Block a user