feat(tournament): add mini championship functionality and enhance tournament class handling
- Introduced addMiniChampionship method in tournamentService to create tournaments with predefined classes for mini championships. - Updated getTournaments method to filter tournaments based on type, including support for mini championships. - Enhanced TournamentClass model to include maxBirthYear for age class restrictions. - Modified tournamentController and tournamentRoutes to support new mini championship endpoint. - Updated frontend components to manage mini championship creation and display, including localization for new terms.
This commit is contained in:
@@ -2,6 +2,7 @@ import express from 'express';
|
||||
import {
|
||||
getTournaments,
|
||||
addTournament,
|
||||
addMiniChampionship,
|
||||
updateTournament,
|
||||
addParticipant,
|
||||
getParticipants,
|
||||
@@ -105,6 +106,9 @@ router.get('/stages', authenticate, getStages);
|
||||
router.put('/stages', authenticate, upsertStages);
|
||||
router.post('/stages/advance', authenticate, advanceStage);
|
||||
|
||||
// Minimeisterschaft anlegen (vor :clubId, damit 'mini' nicht als clubId matcht)
|
||||
router.post('/mini', authenticate, addMiniChampionship);
|
||||
|
||||
// Muss NACH allen festen Pfaden stehen, sonst matcht z.B. '/stages' als clubId='stages'
|
||||
router.get('/:clubId', authenticate, getTournaments);
|
||||
router.post('/', authenticate, addTournament);
|
||||
|
||||
Reference in New Issue
Block a user