Enhance member gallery generation with customizable image size selection

This commit updates the member gallery generation feature by allowing users to specify the image size through the frontend. The DiaryView component now includes a dropdown for selecting image dimensions (100x100, 150x150, 200x200), which is passed to the backend for processing. The memberService has been modified to validate the size parameter, ensuring only allowed dimensions are used. These changes improve user experience by providing flexibility in gallery display options.
This commit is contained in:
Torsten Schulz (local)
2025-11-12 10:05:08 +01:00
parent 98c50bc03a
commit 8ef4e1dc9d
3 changed files with 58 additions and 6 deletions

View File

@@ -120,7 +120,8 @@ const generateMemberGallery = async (req, res) => {
try {
const { clubId } = req.params;
const { authcode: userToken } = req.headers;
const result = await MemberService.generateMemberGallery(userToken, clubId);
const size = parseInt(req.query.size) || 200; // Default: 200x200
const result = await MemberService.generateMemberGallery(userToken, clubId, size);
if (result.status === 200) {
res.setHeader('Content-Type', 'image/png');
res.setHeader('Cache-Control', 'no-store');