From 559b4e1e5579aeb427d9e133019191a43fb50695 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Fri, 17 Oct 2025 23:23:48 +0000 Subject: [PATCH] Fix: Include cloudflare_image_id in photo deletions --- src/components/upload/PhotoManagementDialog.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/upload/PhotoManagementDialog.tsx b/src/components/upload/PhotoManagementDialog.tsx index 497f96cc..31572797 100644 --- a/src/components/upload/PhotoManagementDialog.tsx +++ b/src/components/upload/PhotoManagementDialog.tsx @@ -28,6 +28,7 @@ import { Card, CardContent } from '@/components/ui/card'; interface Photo { id: string; + cloudflare_image_id: string; cloudflare_image_url: string; title: string | null; caption: string | null; @@ -69,7 +70,7 @@ export function PhotoManagementDialog({ try { const { data, error } = await supabase .from('photos') - .select('id, cloudflare_image_url, title, caption, order_index, is_featured') + .select('id, cloudflare_image_id, cloudflare_image_url, title, caption, order_index, is_featured') .eq('entity_type', entityType) .eq('entity_id', entityId) .order('order_index', { ascending: true }); @@ -149,6 +150,7 @@ export function PhotoManagementDialog({ item_type: 'photo_delete', item_data: { photo_id: photoToDelete.id, + cloudflare_image_id: photoToDelete.cloudflare_image_id, entity_type: entityType, entity_id: entityId, entity_name: entityName,