Remove dead JSON-fixing code from departures route #15
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem: server/routes/departures.js had 40+ lines of regex-based JSON repair code that attempted to fix malformed API responses. The SL Transport API returns valid JSON, making this dead code from an earlier debugging session.
Solution: Simplified fetchDeparturesForSite() to a single JSON.parse() with a clean error handler.
Files changed: