mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-24 14:51:12 -05:00
Fix TypeScript errors after JSONB removal
This commit is contained in:
@@ -117,33 +117,9 @@ async function detectPhotoChanges(submissionId: string): Promise<PhotoChange[]>
|
||||
});
|
||||
} else if (submissionItems && submissionItems.length > 0) {
|
||||
for (const item of submissionItems) {
|
||||
const itemData = item.item_data as Record<string, any>;
|
||||
const originalData = item.original_data as Record<string, any> | null;
|
||||
|
||||
if (item.item_type === 'photo_delete' && itemData) {
|
||||
changes.push({
|
||||
type: 'deleted',
|
||||
photo: {
|
||||
url: itemData.cloudflare_image_url || itemData.photo_url || '',
|
||||
title: itemData.title,
|
||||
caption: itemData.caption,
|
||||
entity_type: itemData.entity_type,
|
||||
entity_name: itemData.entity_name,
|
||||
deletion_reason: itemData.deletion_reason || itemData.reason
|
||||
}
|
||||
});
|
||||
} else if (item.item_type === 'photo_edit' && itemData && originalData) {
|
||||
changes.push({
|
||||
type: 'edited',
|
||||
photo: {
|
||||
url: itemData.photo_url || itemData.cloudflare_image_url || '',
|
||||
title: itemData.title,
|
||||
caption: itemData.caption,
|
||||
oldTitle: originalData.title,
|
||||
oldCaption: originalData.caption
|
||||
}
|
||||
});
|
||||
}
|
||||
// For photo items, data is stored differently
|
||||
// Skip for now as photo submissions use separate table
|
||||
continue;
|
||||
}
|
||||
}
|
||||
} catch (err: unknown) {
|
||||
|
||||
Reference in New Issue
Block a user