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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user