fix: akualizace detekce polévek pro TechTower
CI / Generate TypeScript types (push) Successful in 10s
CI / Server unit tests (push) Successful in 27s
CI / Build server (push) Successful in 29s
CI / Build client (push) Successful in 42s
CI / Playwright E2E tests (push) Successful in 2m22s
CI / Build and push Docker image (push) Successful in 46s
CI / Notify (push) Successful in 2s

This commit is contained in:
mates committed 2026-11-09 15:02:19 +01:00
1 parent 61fd1cfe32
commit 3c08f71f63
1 file changed
+5 -4
+5 -4
View File
@@ -37,6 +37,7 @@ const SOUP_NAMES = [
'hrášková s ',
'hrachová s ',
'bramborový krém',
'kaldoun',
];
const DAYS_IN_WEEK = ['pondělí', 'úterý', 'středa', 'čtvrtek', 'pátek', 'sobota', 'neděle'];
@@ -539,7 +540,7 @@ export const getMenuZastavkaUmichala = async (firstDayOfWeek: Date, mock: boolea
}
const today = new Date();
today.setHours(0,0,0,0);
today.setHours(0, 0, 0, 0);
const headers = {
"Cookie": "_nss=1; PHPSESSID=9e37de17e0326b0942613d6e67a30e69",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36",
@@ -548,7 +549,7 @@ export const getMenuZastavkaUmichala = async (firstDayOfWeek: Date, mock: boolea
for (let dayIndex = 0; dayIndex < 5; dayIndex++) {
const currentDate = new Date(firstDayOfWeek);
currentDate.setDate(firstDayOfWeek.getDate() + dayIndex);
currentDate.setHours(0,0,0,0);
currentDate.setHours(0, 0, 0, 0);
if (currentDate < today || (currentDate.getTime() === today.getTime() && new Date().getHours() >= 14)) {
result[dayIndex] = [{
amount: undefined,
@@ -600,11 +601,11 @@ export const getMenuSenkSerikova = async (firstDayOfWeek: Date, mock: boolean =
const $ = load(html);
const today = new Date();
today.setHours(0,0,0,0);
today.setHours(0, 0, 0, 0);
const currentDate = new Date(firstDayOfWeek);
const result: Food[][] = [];
let dayIndex = 0;
currentDate.setHours(0,0,0,0);
currentDate.setHours(0, 0, 0, 0);
while (currentDate < today) {
result[dayIndex] = [{
amount: undefined,