- #21: Add missing await in removeChoiceIfPresent() to prevent user appearing in two restaurants - #15: Add 1-hour TTL for menu refetching to avoid scraping on every page load - #9: Block stats API and UI navigation for future dates - #14: Add restaurant warnings (missing soup/prices, stale data) with warning icon - #12: Pre-fill restaurant/departure dropdowns from existing choices on page refresh - #10: Add voting statistics endpoint and table on stats page
This commit is contained in:
@@ -25,6 +25,12 @@ export async function getStats(startDate: string, endDate: string): Promise<Week
|
||||
throw 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');
|
||||
}
|
||||
|
||||
const result = [];
|
||||
for (const date = start; date <= end; date.setDate(date.getDate() + 1)) {
|
||||
const locationsStats: DailyStats = {
|
||||
|
||||
Reference in New Issue
Block a user