refactor: opravy dle SonarQube
CI / Generate TypeScript types (push) Successful in 10s
CI / Server unit tests (push) Successful in 20s
CI / Build server (push) Successful in 29s
CI / Build client (push) Successful in 33s
CI / Playwright E2E tests (push) Has been cancelled
CI / Build and push Docker image (push) Has been cancelled
CI / Notify (push) Has been cancelled

This commit is contained in:
2026-05-10 08:44:39 +02:00
parent 3ba5fdd086
commit 5e596c3b99
11 changed files with 66 additions and 66 deletions
+2 -2
View File
@@ -22,13 +22,13 @@ export async function getStats(startDate: string, endDate: string): Promise<Week
// Dočasná validace, aby to někdo ručně neshodil
const daysDiff = ((end as any) - (start as any)) / (1000 * 60 * 60 * 24);
if (daysDiff > 4) {
throw Error('Neplatný rozsah');
throw new Error('Neplatný rozsah');
}
const today = new Date();
today.setHours(23, 59, 59, 999);
if (end > today) {
throw Error('Nelze načíst statistiky pro budoucí datum');
throw new Error('Nelze načíst statistiky pro budoucí datum');
}
const result = [];