feat(officialTournament): add auto-registration for tournament participants

- Implemented a new endpoint to automatically register participants for official tournaments using the Click-TT service.
- Added a corresponding method in the frontend to trigger the auto-registration process, enhancing user experience by simplifying participant management.
- Updated the official tournament controller and routes to support the new functionality.
This commit is contained in:
Torsten Schulz (local)
2026-03-11 20:47:44 +01:00
parent 36ed320893
commit 2f82886ad6
4 changed files with 417 additions and 3 deletions

View File

@@ -1,7 +1,17 @@
import express from 'express';
import multer from 'multer';
import { authenticate } from '../middleware/authMiddleware.js';
import { uploadTournamentPdf, getParsedTournament, listOfficialTournaments, deleteOfficialTournament, updateOfficialTournament, upsertCompetitionMember, listClubParticipations, updateParticipantStatus } from '../controllers/officialTournamentController.js';
import {
uploadTournamentPdf,
getParsedTournament,
listOfficialTournaments,
deleteOfficialTournament,
updateOfficialTournament,
upsertCompetitionMember,
listClubParticipations,
updateParticipantStatus,
autoRegisterOfficialTournamentParticipants
} from '../controllers/officialTournamentController.js';
const router = express.Router();
const upload = multer({ storage: multer.memoryStorage() });
@@ -16,7 +26,7 @@ router.patch('/:clubId/:id', updateOfficialTournament);
router.delete('/:clubId/:id', deleteOfficialTournament);
router.post('/:clubId/:id/participation', upsertCompetitionMember);
router.post('/:clubId/:id/status', updateParticipantStatus);
router.post('/:clubId/:id/auto-register', autoRegisterOfficialTournamentParticipants);
export default router;