mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-23 13:11:12 -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 {
|
interface Photo {
|
||||||
id: string;
|
id: string;
|
||||||
|
cloudflare_image_id: string;
|
||||||
cloudflare_image_url: string;
|
cloudflare_image_url: string;
|
||||||
title: string | null;
|
title: string | null;
|
||||||
caption: string | null;
|
caption: string | null;
|
||||||
@@ -69,7 +70,7 @@ export function PhotoManagementDialog({
|
|||||||
try {
|
try {
|
||||||
const { data, error } = await supabase
|
const { data, error } = await supabase
|
||||||
.from('photos')
|
.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_type', entityType)
|
||||||
.eq('entity_id', entityId)
|
.eq('entity_id', entityId)
|
||||||
.order('order_index', { ascending: true });
|
.order('order_index', { ascending: true });
|
||||||
@@ -149,6 +150,7 @@ export function PhotoManagementDialog({
|
|||||||
item_type: 'photo_delete',
|
item_type: 'photo_delete',
|
||||||
item_data: {
|
item_data: {
|
||||||
photo_id: photoToDelete.id,
|
photo_id: photoToDelete.id,
|
||||||
|
cloudflare_image_id: photoToDelete.cloudflare_image_id,
|
||||||
entity_type: entityType,
|
entity_type: entityType,
|
||||||
entity_id: entityId,
|
entity_id: entityId,
|
||||||
entity_name: entityName,
|
entity_name: entityName,
|
||||||
|
|||||||
Reference in New Issue
Block a user