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
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:
+2
-2
@@ -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 = [];
|
||||
|
||||
Reference in New Issue
Block a user