This commit is contained in:
Timothy Jaeryang Baek
2026-02-09 14:03:35 -06:00
parent 1034b74abd
commit c2f5cb542e
6 changed files with 17 additions and 33 deletions
-26
View File
@@ -300,32 +300,6 @@ export const updateUserSettings = async (token: string, settings: object) => {
return res;
};
export const getUserById = async (token: string, userId: string) => {
let error = null;
const res = await fetch(`${WEBUI_API_BASE_URL}/users/${userId}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${token}`
}
})
.then(async (res) => {
if (!res.ok) throw await res.json();
return res.json();
})
.catch((err) => {
console.error(err);
error = err.detail;
return null;
});
if (error) {
throw error;
}
return res;
};
export const getUserInfoById = async (token: string, userId: string) => {
let error = null;