started tournament implementation
This commit is contained in:
31
backend/routes/tournamentRoutes.js
Normal file
31
backend/routes/tournamentRoutes.js
Normal 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;
|
||||
Reference in New Issue
Block a user