Merge pull request #308 from the-luap/fix/welcome-message-and-guest-thumbnails

fix: display welcome message in gallery and fix guest thumbnail URLs (#306, #307)
This commit is contained in:
Paul Nothaft
2026-04-12 20:58:24 +02:00
committed by GitHub
3 changed files with 13 additions and 6 deletions
+4 -4
View File
@@ -138,8 +138,8 @@ router.get(
id: p.id,
filename: p.filename,
original_filename: p.original_filename,
url: `/admin/photos/${eventId}/photo/${p.id}`,
thumbnail_url: `/admin/photos/${eventId}/thumbnail/${p.id}`,
url: `/api/admin/photos/${eventId}/photo/${p.id}`,
thumbnail_url: `/api/admin/photos/${eventId}/thumbnail/${p.id}`,
picker_count: parseInt(p.picker_count, 10),
})),
});
@@ -418,8 +418,8 @@ router.get(
filename: row.filename,
original_filename: row.original_filename,
type: row.type,
url: `/admin/photos/${eventId}/photo/${row.photo_id}`,
thumbnail_url: `/admin/photos/${eventId}/thumbnail/${row.photo_id}`,
url: `/api/admin/photos/${eventId}/photo/${row.photo_id}`,
thumbnail_url: `/api/admin/photos/${eventId}/thumbnail/${row.photo_id}`,
});
const selections = {
+2 -2
View File
@@ -922,9 +922,9 @@ router.get('/:eventId/photos', adminAuth, requirePermission('photos.view'), requ
filename: photo.filename,
original_filename: photo.original_filename || null,
// Use the correct admin photos router base for serving images
url: `/admin/photos/${eventId}/photo/${photo.id}`,
url: `/api/admin/photos/${eventId}/photo/${photo.id}`,
// Always expose a thumbnail URL; backend will generate on demand if missing
thumbnail_url: `/admin/photos/${eventId}/thumbnail/${photo.id}`,
thumbnail_url: `/api/admin/photos/${eventId}/thumbnail/${photo.id}`,
type: photo.type,
category_id: photo.category_id || photo.type,
category_name: photo.pc_name || (photo.type === 'individual' ? 'Individual Photos' : 'Collages'),