feat/enh: move chats in folder on delete

Co-Authored-By: expruc <25387342+expruc@users.noreply.github.com>
This commit is contained in:
Timothy Jaeryang Baek
2025-11-23 00:01:49 -05:00
co-authored by expruc
parent b2034861ae
commit e6951e804a
5 changed files with 76 additions and 26 deletions
+5 -2
View File
@@ -239,10 +239,13 @@ export const updateFolderItemsById = async (token: string, id: string, items: Fo
return res;
};
export const deleteFolderById = async (token: string, id: string) => {
export const deleteFolderById = async (token: string, id: string, deleteContents: boolean) => {
let error = null;
const res = await fetch(`${WEBUI_API_BASE_URL}/folders/${id}`, {
const searchParams = new URLSearchParams();
searchParams.append('delete_contents', deleteContents ? 'true' : 'false');
const res = await fetch(`${WEBUI_API_BASE_URL}/folders/${id}?${searchParams.toString()}`, {
method: 'DELETE',
headers: {
Accept: 'application/json',