1 Commits

Author SHA1 Message Date
BOHA
746d17e182 fix: parse YYYY-MM month filter correctly in attendance history
The frontend sends month as "YYYY-MM" but the route handler was passing
it through Number() which parsed only the year portion, causing the
service to ignore the month filter entirely.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-29 09:29:47 +02:00
2 changed files with 9 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "app-ts",
"version": "1.5.8",
"version": "1.5.9",
"description": "",
"main": "dist/server.js",
"scripts": {

View File

@@ -220,8 +220,14 @@ export default async function attendanceRoutes(
userId,
isAdmin,
authUserId: authData.userId,
month: query.month ? Number(query.month) : undefined,
year: query.year ? Number(query.year) : undefined,
month: query.month
? Number(String(query.month).split("-")[1])
: undefined,
year: query.month
? Number(String(query.month).split("-")[0])
: query.year
? Number(query.year)
: undefined,
});
return reply.send({