Implement tournament pairing functionality and enhance participant management
- Introduced new endpoints for managing tournament pairings, including creating, updating, and deleting pairings. - Updated the tournament service to handle pairing logic, ensuring validation for participants and preventing duplicate pairings. - Enhanced participant management by adding class-based checks for gender and age restrictions when adding participants. - Updated the tournament controller and routes to support the new pairing features and improved participant handling. - Added localization support for new UI elements related to pairings in the frontend, enhancing user experience.
This commit is contained in:
@@ -34,6 +34,10 @@ import {
|
||||
updateParticipantClass,
|
||||
createGroupsPerClass,
|
||||
assignParticipantToGroup,
|
||||
getPairings,
|
||||
createPairing,
|
||||
updatePairing,
|
||||
deletePairing,
|
||||
} from '../controllers/tournamentController.js';
|
||||
import { authenticate } from '../middleware/authMiddleware.js';
|
||||
|
||||
@@ -78,4 +82,10 @@ router.put('/class/:clubId/:tournamentId/:classId', authenticate, updateTourname
|
||||
router.delete('/class/:clubId/:tournamentId/:classId', authenticate, deleteTournamentClass);
|
||||
router.put('/participant/:clubId/:tournamentId/:participantId/class', authenticate, updateParticipantClass);
|
||||
|
||||
// Tournament Pairings
|
||||
router.get('/pairings/:clubId/:tournamentId/:classId', authenticate, getPairings);
|
||||
router.post('/pairing/:clubId/:tournamentId/:classId', authenticate, createPairing);
|
||||
router.put('/pairing/:clubId/:tournamentId/:pairingId', authenticate, updatePairing);
|
||||
router.delete('/pairing/:clubId/:tournamentId/:pairingId', authenticate, deletePairing);
|
||||
|
||||
export default router;
|
||||
|
||||
Reference in New Issue
Block a user