mirror of
https://github.com/donpat1to/Schichtenplaner.git
synced 2025-12-01 06:55:45 +01:00
fixed auth handling for access control
This commit is contained in:
@@ -20,18 +20,12 @@ router.use(authMiddleware);
|
||||
// GET all shift plans (including templates)
|
||||
router.get('/' , authMiddleware, getShiftPlans);
|
||||
|
||||
// GET templates only
|
||||
//router.get('/templates', getTemplates);
|
||||
|
||||
// GET specific shift plan or template
|
||||
router.get('/:id', authMiddleware, getShiftPlan);
|
||||
|
||||
// POST create new shift plan
|
||||
router.post('/', requireRole(['admin', 'instandhalter']), createShiftPlan);
|
||||
|
||||
// POST create new plan from template
|
||||
//router.post('/from-template', requireRole(['admin', 'instandhalter']), createFromTemplate);
|
||||
|
||||
// POST create new plan from preset
|
||||
router.post('/from-preset', requireRole(['admin', 'instandhalter']), createFromPreset);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user