From d43365e243a8cf9bef3a856e2bf65c9b401e78e5 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Wed, 14 Mar 2018 18:53:28 +0100 Subject: Routes: Add `/costs` route Render the `costs` field of a `Chouette::Route` as JSON. This lives at: http://stif-boiv.dev:3000/referentials/4/lines/1857/routes/7/costs.json I want this in order to get the distance & time costs of a route so that I can merge them with `JourneyPattern#costs` on the frontend on `JourneyPatternsCollection#show`. Refs #6203 --- config/routes.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'config/routes.rb') diff --git a/config/routes.rb b/config/routes.rb index 6313b5678..25105241a 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -74,6 +74,7 @@ ChouetteIhm::Application.routes.draw do member do get 'edit_boarding_alighting' put 'save_boarding_alighting' + get 'costs' post 'duplicate', to: 'routes#duplicate' end resource :journey_patterns_collection, :only => [:show, :update] -- cgit v1.2.3