diff --git a/package.json b/package.json index dbcd8fb..819dd6e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "app-ts", - "version": "1.5.8", + "version": "1.5.9", "description": "", "main": "dist/server.js", "scripts": { diff --git a/src/routes/admin/attendance.ts b/src/routes/admin/attendance.ts index 06b74bc..126d3cd 100644 --- a/src/routes/admin/attendance.ts +++ b/src/routes/admin/attendance.ts @@ -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({