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:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user