feat/enh: group share setting

This commit is contained in:
Timothy Jaeryang Baek
2025-11-20 19:12:56 -05:00
parent d1e7957e69
commit 7be750bcbb
7 changed files with 65 additions and 17 deletions
+7 -2
View File
@@ -31,10 +31,15 @@ export const createNewGroup = async (token: string, group: object) => {
return res;
};
export const getGroups = async (token: string = '') => {
export const getGroups = async (token: string = '', share?: boolean) => {
let error = null;
const res = await fetch(`${WEBUI_API_BASE_URL}/groups/`, {
const searchParams = new URLSearchParams();
if (share !== undefined) {
searchParams.append('share', String(share));
}
const res = await fetch(`${WEBUI_API_BASE_URL}/groups/?${searchParams.toString()}`, {
method: 'GET',
headers: {
Accept: 'application/json',