Add timefix and vacation routes to backend; update frontend for new routes and page titles
This commit is contained in:
18
backend/src/routes/vacation.js
Normal file
18
backend/src/routes/vacation.js
Normal file
@@ -0,0 +1,18 @@
|
||||
const express = require('express');
|
||||
const router = express.Router();
|
||||
const VacationController = require('../controllers/VacationController');
|
||||
const unhashRequestIds = require('../middleware/unhashRequest');
|
||||
|
||||
// Hinweis: Authentifizierung wird bereits in index.js durch authenticateToken Middleware gehandhabt
|
||||
|
||||
// GET /api/vacation - Liste aller Urlaubseinträge
|
||||
router.get('/', VacationController.getAllVacations);
|
||||
|
||||
// POST /api/vacation - Neuen Urlaubseintrag erstellen
|
||||
router.post('/', VacationController.createVacation);
|
||||
|
||||
// DELETE /api/vacation/:id - Urlaubseintrag löschen
|
||||
router.delete('/:id', unhashRequestIds, VacationController.deleteVacation);
|
||||
|
||||
module.exports = router;
|
||||
|
||||
Reference in New Issue
Block a user