This commit is contained in:
Timothy Jaeryang Baek
2026-01-09 18:51:38 +04:00
parent 10838b3654
commit 401c1949a0
3 changed files with 47 additions and 2 deletions

View File

@@ -423,6 +423,19 @@ export const updateUserProfile = async (token: string, profile: object) => {
return res;
};
export const updateUserTimezone = async (token: string, timezone: string) => {
await fetch(`${WEBUI_API_BASE_URL}/auths/update/timezone`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
...(token && { authorization: `Bearer ${token}` })
},
body: JSON.stringify({ timezone })
}).catch((err) => {
console.error('Failed to update timezone:', err);
});
};
export const updateUserPassword = async (token: string, password: string, newPassword: string) => {
let error = null;