aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/routes
diff options
context:
space:
mode:
authorTeddy Wing2018-03-14 18:53:28 +0100
committerTeddy Wing2018-03-15 17:42:34 +0100
commitd43365e243a8cf9bef3a856e2bf65c9b401e78e5 (patch)
treea43250327dcca24ebfb7f4bfc28784b4491b4188 /app/views/routes
parentf011f7e9806ffeaaba3ad73510bc818211f55dbd (diff)
downloadchouette-core-d43365e243a8cf9bef3a856e2bf65c9b401e78e5.tar.bz2
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
Diffstat (limited to 'app/views/routes')
-rw-r--r--app/views/routes/costs.rabl2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/views/routes/costs.rabl b/app/views/routes/costs.rabl
new file mode 100644
index 000000000..d4465d03e
--- /dev/null
+++ b/app/views/routes/costs.rabl
@@ -0,0 +1,2 @@
+object @route
+attributes :costs