rc 1.0
This commit is contained in:
@@ -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
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user