Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def __init__(self, long_name: str, location: Location, url_id: int, queue_status
"Mensa Lothstraße",
Location("Lothstraße 13d, München", 48.153989, 11.552424),
431,
"https://api.betterhm.app/v1/capacity/MENSA_LOTHSTR",
"https://api.redcube.dev/v1/capacity/MENSA_LOTHSTR",
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new queue-status URLs duplicate the same base host/path across multiple enum entries. To reduce future churn when the host changes again, consider defining a single constant/base URL (or small helper) and building these URLs from it instead of repeating the full string in each entry.

Copilot uses AI. Check for mistakes.
OpenHours(("11:00", "14:00"), ("11:00", "14:00"), ("11:00", "14:00"), ("11:00", "14:00"), ("11:00", "14:00")),
)
MENSA_MARTINSRIED = (
Expand All @@ -198,7 +198,7 @@ def __init__(self, long_name: str, location: Location, url_id: int, queue_status
"Mensa Pasing",
Location("Am Stadtpark 20, München", 48.141568, 11.451119),
432,
"https://api.betterhm.app/v1/capacity/MENSA_PASING",
"https://api.redcube.dev/v1/capacity/MENSA_PASING",
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given this change is motivated by the previous domain going down, it would be valuable to add a lightweight test/guard (e.g., asserting no canteen queue_status URL contains the old domain, or that any non-None queue_status uses the expected host). That would prevent silently reintroducing a dead endpoint later.

Copilot uses AI. Check for mistakes.
OpenHours(("11:00", "14:00"), ("11:00", "14:00"), ("11:00", "14:00"), ("11:00", "14:00"), ("11:00", "14:00")),
)
MENSA_WEIHENSTEPHAN = (
Expand Down Expand Up @@ -335,7 +335,7 @@ def __init__(self, long_name: str, location: Location, url_id: int, queue_status
"StuCafé Pasing",
Location("Am Stadtpark 20, München", 48.141568, 11.451119),
534,
"https://api.betterhm.app/v1/capacity/STUCAFE_PASING",
"https://api.redcube.dev/v1/capacity/STUCAFE_PASING",
OpenHours(("07:45", "16:15"), ("07:45", "16:15"), ("07:45", "16:00"), ("07:45", "16:00"), ("07:45", "14:30")),
)
FMI_BISTRO = (
Expand Down