From b9c477cadf21014f1ec99e2921808a68b1dfbd61 Mon Sep 17 00:00:00 2001 From: friday-bot Date: Wed, 27 May 2026 16:57:03 -0600 Subject: [PATCH] fix: seed all gallery photos that exist on disk Previous seed generated paths 0001-0018.jpg but only 0001-0010.jpg exist. Corrects to seed only 0001-0010.jpg and adds the extra photos (1-6.jpg, IMG_1615(1).jpg) so all 17 images appear on deploy. --- server/src/seed.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/server/src/seed.ts b/server/src/seed.ts index fa7bd64..a85c3ec 100644 --- a/server/src/seed.ts +++ b/server/src/seed.ts @@ -46,8 +46,14 @@ async function seed() { // Gallery const galleryCount = await GalleryItem.countDocuments(); if (galleryCount === 0) { - const items = Array.from({ length: 18 }, (_, i) => ({ - imageUrl: `/photos/${String(i + 1).padStart(4, '0')}.jpg`, + const photoPaths = [ + ...Array.from({ length: 10 }, (_, i) => `/photos/${String(i + 1).padStart(4, '0')}.jpg`), + '/photos/1.jpg', '/photos/2.jpg', '/photos/3.jpg', + '/photos/4.jpg', '/photos/5.jpg', '/photos/6.jpg', + '/photos/IMG_1615(1).jpg', + ]; + const items = photoPaths.map((imageUrl, i) => ({ + imageUrl, alt: 'MCDi community event photo', order: i, }));