feat(MemberGroupPhoto): implement group photo management functionality
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 38s
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 38s
- Added MemberGroupPhoto model and established relationships with Club and User models. - Introduced new routes for managing group photos in the backend. - Enhanced frontend components to support group photo cropping and member image updates. - Updated localization files to include new terms related to group photo processing across multiple languages. - Refactored server.js to include MemberGroupPhoto in the synchronization process.
This commit is contained in:
25
backend/routes/memberGroupPhotoRoutes.js
Normal file
25
backend/routes/memberGroupPhotoRoutes.js
Normal file
@@ -0,0 +1,25 @@
|
||||
import express from 'express';
|
||||
import multer from 'multer';
|
||||
import { authenticate } from '../middleware/authMiddleware.js';
|
||||
import { authorize } from '../middleware/authorizationMiddleware.js';
|
||||
import {
|
||||
listMemberGroupPhotos,
|
||||
createMemberGroupPhoto,
|
||||
updateMemberGroupPhoto,
|
||||
deleteMemberGroupPhoto,
|
||||
getMemberGroupPhotoImage
|
||||
} from '../controllers/memberGroupPhotoController.js';
|
||||
|
||||
const router = express.Router();
|
||||
const upload = multer({
|
||||
storage: multer.memoryStorage(),
|
||||
limits: { fileSize: 15 * 1024 * 1024 }
|
||||
});
|
||||
|
||||
router.get('/:clubId', authenticate, authorize('members', 'read'), listMemberGroupPhotos);
|
||||
router.post('/:clubId', authenticate, authorize('members', 'write'), upload.single('image'), createMemberGroupPhoto);
|
||||
router.get('/:clubId/:photoId/image', authenticate, authorize('members', 'read'), getMemberGroupPhotoImage);
|
||||
router.put('/:clubId/:photoId', authenticate, authorize('members', 'write'), updateMemberGroupPhoto);
|
||||
router.delete('/:clubId/:photoId', authenticate, authorize('members', 'write'), deleteMemberGroupPhoto);
|
||||
|
||||
export default router;
|
||||
Reference in New Issue
Block a user