Fixed Date #30
This commit is contained in:
@@ -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." });
|
||||
|
||||
Reference in New Issue
Block a user