Add group deletion functionality and socket event emissions for real-time updates

This commit introduces the ability to delete groups in the groupController, along with the necessary backend service updates. It also adds socket event emissions for group and activity changes, ensuring real-time updates are sent to clients when groups are deleted. The frontend is updated to include a delete button in the DiaryView, allowing users to remove groups easily. Additionally, the groupRoutes and socketService are modified to support these new features, enhancing the overall interactivity of the application.
This commit is contained in:
Torsten Schulz (local)
2025-11-13 18:48:51 +01:00
parent 2b06a8dd10
commit 9b8dcd8561
8 changed files with 326 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
import express from 'express';
import { authenticate } from '../middleware/authMiddleware.js';
import { addGroup, getGroups, changeGroup } from '../controllers/groupController.js';
import { addGroup, getGroups, changeGroup, deleteGroup } from '../controllers/groupController.js';
const router = express.Router();
@@ -9,5 +9,6 @@ router.use(authenticate);
router.post('/', addGroup);
router.get('/:clubId/:dateId', getGroups);
router.put('/:groupId', changeGroup);
router.delete('/:groupId', deleteGroup);
export default router;