mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-22 00:31:13 -05:00
Fix image deletion logic
This commit is contained in:
@@ -417,9 +417,12 @@ export const ModerationQueue = forwardRef<ModerationQueueRef>((props, ref) => {
|
|||||||
const validImageIds: string[] = [];
|
const validImageIds: string[] = [];
|
||||||
const skippedPhotos: string[] = [];
|
const skippedPhotos: string[] = [];
|
||||||
|
|
||||||
if (item.content?.photos && Array.isArray(item.content.photos)) {
|
// Try both nested paths for photos array (handle different content structures)
|
||||||
console.log('Processing photos from content:', item.content.photos);
|
const photosArray = item.content?.content?.photos || item.content?.photos;
|
||||||
for (const photo of item.content.photos) {
|
|
||||||
|
if (photosArray && Array.isArray(photosArray)) {
|
||||||
|
console.log('Processing photos from content:', photosArray);
|
||||||
|
for (const photo of photosArray) {
|
||||||
console.log('Processing photo object:', photo);
|
console.log('Processing photo object:', photo);
|
||||||
console.log('Photo keys:', Object.keys(photo));
|
console.log('Photo keys:', Object.keys(photo));
|
||||||
console.log('photo.imageId:', photo.imageId, 'type:', typeof photo.imageId);
|
console.log('photo.imageId:', photo.imageId, 'type:', typeof photo.imageId);
|
||||||
|
|||||||
Reference in New Issue
Block a user