feat: add tournament suggestions job and notification system
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 56s
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 56s
- Implemented a scheduled job for fetching tournament suggestions in the scheduler service. - Added a new service for handling tournament suggestions, including fetching and updating suggestions. - Created notification system with models, controllers, and services for managing user notifications. - Introduced a notification bell component in the frontend to display unread notifications. - Added a notifications view for users to see all notifications and mark them as read. - Updated API client and socket service to handle notifications and authentication. - Created database migrations for notifications and tournament suggestions.
This commit is contained in:
11
backend/routes/notificationRoutes.js
Normal file
11
backend/routes/notificationRoutes.js
Normal file
@@ -0,0 +1,11 @@
|
||||
import express from 'express';
|
||||
import { authenticate } from '../middleware/authMiddleware.js';
|
||||
import { listNotifications, markAllRead, markRead, unreadCount } from '../controllers/notificationController.js';
|
||||
|
||||
const router = express.Router();
|
||||
router.use(authenticate);
|
||||
router.get('/', listNotifications);
|
||||
router.get('/unread-count', unreadCount);
|
||||
router.post('/read-all', markAllRead);
|
||||
router.post('/:recipientId/read', markRead);
|
||||
export default router;
|
||||
@@ -12,6 +12,7 @@ import {
|
||||
updateParticipantStatus,
|
||||
autoRegisterOfficialTournamentParticipants
|
||||
} from '../controllers/officialTournamentController.js';
|
||||
import { fetchTournamentSuggestions, listTournamentSuggestions, updateTournamentSuggestion } from '../controllers/tournamentSuggestionController.js';
|
||||
|
||||
const router = express.Router();
|
||||
const upload = multer({ storage: multer.memoryStorage() });
|
||||
@@ -19,6 +20,9 @@ const upload = multer({ storage: multer.memoryStorage() });
|
||||
router.use(authenticate);
|
||||
|
||||
router.get('/:clubId', listOfficialTournaments);
|
||||
router.get('/:clubId/suggestions', listTournamentSuggestions);
|
||||
router.post('/:clubId/suggestions/fetch', fetchTournamentSuggestions);
|
||||
router.patch('/:clubId/suggestions/:id', updateTournamentSuggestion);
|
||||
router.get('/:clubId/participations/summary', listClubParticipations);
|
||||
router.post('/:clubId/upload', upload.single('pdf'), uploadTournamentPdf);
|
||||
router.get('/:clubId/:id', getParsedTournament);
|
||||
@@ -29,4 +33,3 @@ router.post('/:clubId/:id/status', updateParticipantStatus);
|
||||
router.post('/:clubId/:id/auto-register', autoRegisterOfficialTournamentParticipants);
|
||||
|
||||
export default router;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user