Skip to content

fix: repair eRail endpoint requests - #6

Open
freakynit wants to merge 1 commit into
AniCrad:mainfrom
freakynit:fix/erail-api-endpoints
Open

fix: repair eRail endpoint requests#6
freakynit wants to merge 1 commit into
AniCrad:mainfrom
freakynit:fix/erail-api-endpoints

Conversation

@freakynit

Copy link
Copy Markdown

Summary

  • build eRail URLs with URLSearchParams so station codes no longer contain whitespace
  • validate required query parameters and return structured 400/502 responses
  • correct train-on-date month handling and validate calendar dates
  • declare Node 18+ for built-in fetch support

Verification

  • npm ci
  • node syntax checks
  • live smoke tests for train lookup, route, station live status, between-stations, and train-on-date

@freakynit

Copy link
Copy Markdown
Author

@AniCrad This pr fixes all endpoints. Verified properly.

@freakynit freakynit mentioned this pull request Jul 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants