This commit is contained in:
root
2025-12-21 17:36:44 +01:00
parent bb1c5b43d6
commit 8a0835c564
15 changed files with 1124 additions and 193 deletions

View File

@@ -45,10 +45,18 @@ export async function GET() {
(soldOutDate.getTime() - dropDate.getTime()) / (1000 * 60 * 60)
)
// Fetch images for this drop
const [imageRows] = await pool.execute(
'SELECT image_url FROM drop_images WHERE drop_id = ? ORDER BY display_order ASC LIMIT 4',
[drop.id]
)
const images = (imageRows as any[]).map((row: any) => row.image_url)
soldOutDrops.push({
...drop,
fill: fill,
soldOutInHours: hoursDiff,
images: images.length > 0 ? images : (drop.image_url ? [drop.image_url] : []), // Support legacy single image_url
})
}
}