added changing password frontend backend

This commit is contained in:
2025-10-13 11:57:27 +02:00
parent 6de3216dcd
commit dec92daf7c
8 changed files with 595 additions and 25 deletions

View File

@@ -8,7 +8,8 @@ import {
updateEmployee,
deleteEmployee,
getAvailabilities,
updateAvailabilities
updateAvailabilities,
changePassword
} from '../controllers/employeeController.js';
const router = express.Router();
@@ -22,6 +23,7 @@ router.get('/:id', requireRole(['admin', 'instandhalter']), getEmployee);
router.post('/', requireRole(['admin']), createEmployee);
router.put('/:id', requireRole(['admin']), updateEmployee);
router.delete('/:id', requireRole(['admin']), deleteEmployee);
router.put('/:id/password', requireRole(['admin']), changePassword);
// Availability Routes
router.get('/:employeeId/availabilities', requireRole(['admin', 'instandhalter']), getAvailabilities);