Fixed Date #30
All checks were successful
Build and Push Docker Images / build-backend (push) Successful in 33s
Build and Push Docker Images / build-frontend (push) Successful in 5m54s

This commit is contained in:
2026-01-14 15:51:04 +01:00
parent 767152c535
commit 6f5fed0ffb
2 changed files with 5 additions and 3 deletions

View File

@@ -388,7 +388,9 @@ export default async function staffTimeRoutes(server: FastifyInstance) {
const evaluatedUserId = targetUserId || actingUserId;
const startDate = new Date(from);
const endDate = new Date(to);
let endDateQuery = new Date(to);
endDateQuery.setDate(endDateQuery.getDate() + 1);
const endDate = endDateQuery;
if (isNaN(startDate.getTime()) || isNaN(endDate.getTime())) {
return reply.code(400).send({ error: "Ungültiges Datumsformat." });