Remove dead JSON-fixing code from departures route #15

Closed
opened 2026-02-15 05:31:52 -08:00 by kyle · 0 comments
Owner

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:

  • server/routes/departures.js - Removed dead JSON repair code
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: - server/routes/departures.js - Removed dead JSON repair code
kyle closed this issue 2026-02-15 05:32:18 -08:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kyle/SignageHTML#15