add features
This commit is contained in:
@@ -4,7 +4,7 @@ import { authenticate } from '../middleware/auth.middleware';
|
||||
import { requireGroups } from '../middleware/rbac.middleware';
|
||||
|
||||
const ADMIN_GROUPS = ['dashboard_admin'];
|
||||
const WRITE_GROUPS = ['dashboard_admin', 'dashboard_fahrmeister'];
|
||||
const WRITE_GROUPS = ['dashboard_admin', 'dashboard_fahrmeister', 'dashboard_zeugmeister'];
|
||||
|
||||
const router = Router();
|
||||
|
||||
|
||||
13
backend/src/routes/notification.routes.ts
Normal file
13
backend/src/routes/notification.routes.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { Router } from 'express';
|
||||
import notificationController from '../controllers/notification.controller';
|
||||
import { authenticate } from '../middleware/auth.middleware';
|
||||
|
||||
const router = Router();
|
||||
|
||||
// All routes require authentication; users only see their own notifications.
|
||||
router.get('/', authenticate, notificationController.getNotifications.bind(notificationController));
|
||||
router.get('/count', authenticate, notificationController.getUnreadCount.bind(notificationController));
|
||||
router.patch('/:id/read', authenticate, notificationController.markAsRead.bind(notificationController));
|
||||
router.post('/mark-all-read', authenticate, notificationController.markAllRead.bind(notificationController));
|
||||
|
||||
export default router;
|
||||
Reference in New Issue
Block a user