mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-23 09:11:13 -05:00
Fix: Include cloudflare_image_id in photo deletions
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user