Enable hard delete option for event theme deletion

Updated the delete mutation to include a `hard_delete` query parameter. This ensures themes are permanently removed when deleted. The change improves clarity and control over deletion behavior.
This commit is contained in:
2025-03-14 02:24:01 +01:00
parent ea91511ae5
commit a5ce709e9e

View File

@@ -137,9 +137,10 @@ export const EventThemesProvider: React.FC<EventThemesProviderProps> = ({
const deleteMutation = useMutation({
mutationFn: (id: string) =>
deleteEventTheme({ path: { theme_id: id } }).then(
(result) => result.data,
),
deleteEventTheme({
path: { theme_id: id },
query: { hard_delete: true },
}).then((result) => result.data),
onSuccess: () =>
queryClient.invalidateQueries({
queryKey: listEventThemesOptions().queryKey,