feat: Implement friendly match management features
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 44s
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 44s
- Added backend support for managing friendly matches including listing, creating, updating, and deleting matches. - Introduced a new database table `friendly_match` with relevant fields for match details. - Created a service layer to handle business logic related to friendly matches. - Developed API routes for friendly match operations with appropriate authentication and authorization. - Added a Vue component for managing participants in friendly matches, allowing selection of members and manual entry of names. - Updated existing tournament editor screens to integrate friendly match functionalities.
This commit is contained in:
22
backend/routes/friendlyMatchRoutes.js
Normal file
22
backend/routes/friendlyMatchRoutes.js
Normal file
@@ -0,0 +1,22 @@
|
||||
import express from 'express';
|
||||
import {
|
||||
createFriendlyMatch,
|
||||
deleteFriendlyMatch,
|
||||
getFriendlyMatchMembers,
|
||||
listFriendlyMatches,
|
||||
updateFriendlyMatch,
|
||||
updateFriendlyMatchPlayers,
|
||||
} from '../controllers/friendlyMatchController.js';
|
||||
import { authenticate } from '../middleware/authMiddleware.js';
|
||||
import { authorize } from '../middleware/authorizationMiddleware.js';
|
||||
|
||||
const router = express.Router();
|
||||
|
||||
router.get('/:clubId', authenticate, authorize('schedule', 'read'), listFriendlyMatches);
|
||||
router.post('/:clubId', authenticate, authorize('schedule', 'write'), createFriendlyMatch);
|
||||
router.put('/:clubId/:matchId', authenticate, authorize('schedule', 'write'), updateFriendlyMatch);
|
||||
router.delete('/:clubId/:matchId', authenticate, authorize('schedule', 'write'), deleteFriendlyMatch);
|
||||
router.patch('/:clubId/:matchId/players', authenticate, authorize('schedule', 'write'), updateFriendlyMatchPlayers);
|
||||
router.get('/:clubId/members/list', authenticate, authorize('schedule', 'read'), getFriendlyMatchMembers);
|
||||
|
||||
export default router;
|
||||
Reference in New Issue
Block a user