This commit is contained in:
Timothy Jaeryang Baek committed 2026-05-14 13:12:59 +09:00
1 parent 74ae177d79
commit 9c14740ffb
10 files changed
+619

No files matched your search

+28
View File
@@ -267,3 +267,31 @@ export const removeUserFromGroup = async (token: string, id: string, userIds: st
return res;
};
export const getGroupPreview = async (token: string, id: string) => {
let error = null;
const res = await fetch(`${WEBUI_API_BASE_URL}/groups/id/${id}/preview`, {
method: 'GET',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
authorization: `Bearer ${token}`
}
})
.then(async (res) => {
if (!res.ok) throw await res.json();
return res.json();
})
.catch((err) => {
error = err.detail;
console.error(err);
return null;
});
if (error) {
throw error;
}
return res;
};