started tournament implementation

This commit is contained in:
Torsten Schulz
2025-02-24 16:21:43 +01:00
parent 9442e3683b
commit df41720b50
14 changed files with 906 additions and 15 deletions

View File

@@ -0,0 +1,31 @@
import express from 'express';
import {
getTournaments,
addTournament,
addParticipant,
getParticipants,
setModus,
createGroups,
fillGroups,
getGroups,
getTournament,
getTournamentMatches,
addMatchResult,
} from '../controllers/tournamentController.js';
import { authenticate } from '../middleware/authMiddleware.js';
const router = express.Router();
router.post('/participant', authenticate, addParticipant);
router.post('/participants', authenticate, getParticipants);
router.post('/modus', authenticate, setModus);
router.put('/groups', authenticate, createGroups);
router.post('/groups', authenticate, fillGroups);
router.get('/groups', authenticate, getGroups);
router.post('/match/result', authenticate, addMatchResult);
router.get('/matches/:clubId/:tournamentId', authenticate, getTournamentMatches);
router.get('/:clubId/:tournamentId', authenticate, getTournament);
router.get('/:clubId', authenticate, getTournaments);
router.post('/', authenticate, addTournament);
export default router;