wobsite: completely overhaul URI routes
- We now use the EASY-ROUTES package (used in tvl's panettone!) to have
nice more "web-ey" URIs, instead of the one-URI-per-function mess we
had earlier.
- This also means we don't do string interpolation to generate URIs any
more, which is fantastic.
- Instead of using raw station names for station-calls, each station now
gets a 'slug' (i.e. "Queen's Park" => "queens-park") generated for it
at model load time, which is used in the URI instead.
- This also means we don't link to stations that won't work anyway due
to not being in a model. A new linter checks for this failure case
and prints out warnings!
- LIVE-TRAIN URIs now stay the same, even after the train has been
archived, which is a nice touch.
- Also, you can use any valid live-train identifier or Clickhouse
filename to pull a train back out again, in addition to a new
preferred compact format where we omit the 'train_' prefix.
- You now reach the raw train object via /train/[ltid]/raw in the first
instance, which is nice because the URI stays the same even when the
underlying object gets rescued.
- Redirects were of course set up for all of the old routes.
- Some really really old routes and functions, like the Dijkstra
searcher that uses the rescue model, and the weird /train2 route, are
now just gone.
Loading
Please register or sign in to comment