refac: account details

This commit is contained in:
Timothy Jaeryang Baek
2025-08-21 02:39:25 +04:00
parent 4451f86eb0
commit 86011e40be
6 changed files with 171 additions and 36 deletions
+2 -3
View File
@@ -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) => {