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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user