fix: adds forceDelete flag to folder deletion V2 endpoint

This commit is contained in:
Piyush Gupta
2025-10-16 23:59:49 +05:30
parent d00c9e422f
commit 27f32aa2bc
7 changed files with 39 additions and 9 deletions
@@ -218,12 +218,13 @@ export const useDeleteFolder = () => {
const queryClient = useQueryClient();
return useMutation<object, object, TDeleteFolderDTO>({
mutationFn: async ({ path = "/", folderId, environment, projectId }) => {
mutationFn: async ({ path = "/", folderId, environment, projectId, forceDelete = true }) => {
const { data } = await apiRequest.delete(`/api/v2/folders/${folderId}`, {
data: {
environment,
projectId,
path
path,
forceDelete
}
});
return data;
@@ -59,6 +59,7 @@ export type TDeleteFolderDTO = {
environment: string;
folderId: string;
path?: string;
forceDelete?: boolean;
};
export type TUpdateFolderBatchDTO = {