feat(ui): add 'Unshare All Shared Chats' button to Shared Chats modal (#25848)

This commit is contained in:
G30 authored and GitHub committed 2026-06-17 03:06:41 +02:00
1 parent dfdb76cc46
commit 4584adf900
5 files changed
+114 -3

No files matched your search

+32
View File
@@ -65,6 +65,38 @@ export const unarchiveAllChats = async (token: string) => {
return res;
};
export const unshareAllChats = async (token: string) => {
let error = null;
const res = await fetch(`${WEBUI_API_BASE_URL}/chats/share/all`, {
method: 'DELETE',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
...(token && { authorization: `Bearer ${token}` })
}
})
.then(async (res) => {
if (!res.ok) throw await res.json();
return res.json();
})
.then((json) => {
return json;
})
.catch((err) => {
error = err.detail;
console.error(err);
return null;
});
if (error) {
throw error;
}
return res;
};
export const importChats = async (token: string, chats: object[]) => {
let error = null;