fix: change API url to api.redcube.dev#320
Conversation
There was a problem hiding this comment.
Pull request overview
Updates hardcoded queue-status (capacity) endpoint URLs for specific canteens to use the new api.redcube.dev domain, addressing the outage reported in #319.
Changes:
- Replaced queue-status URLs for
MENSA_LOTHSTR,MENSA_PASING, andSTUCAFE_PASINGfromapi.betterhm.apptoapi.redcube.dev.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 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", |
There was a problem hiding this comment.
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.
| 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", |
There was a problem hiding this comment.
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.
Change the API url from api.betterhm.app to api.redcube.dev, which has an identical interface so no further changes should be needed.
Fixes #319
These changes have NOT been tested