Added online schedulling

This commit is contained in:
Torsten Schulz
2024-09-12 17:34:46 +02:00
parent 28524f4308
commit 07477d991b
105 changed files with 4475 additions and 7563 deletions

View File

@@ -4,8 +4,8 @@ import { authenticate } from '../middleware/authMiddleware.js';
const router = express.Router();
router.get('/', authenticate, getTags); // Route to get all tags
router.post('/', authenticate, createTag); // Route to create a new tag
router.delete('/:tagId', authenticate, deleteTag); // Neue Route zum Löschen eines Tags
router.get('/', authenticate, getTags);
router.post('/', authenticate, createTag);
router.delete('/:tagId', authenticate, deleteTag);
export default router;

View File

@@ -0,0 +1,16 @@
import express from 'express';
import { uploadCSV, getLeaguesForCurrentSeason, getMatchesForLeagues, getMatchesForLeague } from '../controllers/matchController.js';
import { authenticate } from '../middleware/authMiddleware.js';
import multer from 'multer';
const router = express.Router();
const upload = multer({ dest: 'uploads/' });
router.post('/import', authenticate, upload.single('file'), uploadCSV);
router.get('/leagues/current/:clubId', authenticate, getLeaguesForCurrentSeason);
router.get('/leagues/:clubId/matches/:leagueId', authenticate, getMatchesForLeague);
router.get('/leagues/:clubId/matches', authenticate, getMatchesForLeagues);
export default router;