summaryrefslogtreecommitdiff
path: root/index.pl
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-02-24 10:29:58 +0100
committerDaniel Friesel <derf@finalrewind.org>2019-02-24 10:29:58 +0100
commit4cca413880a17d9d31f5ed5c27a29286274ba290 (patch)
tree3dfc5a7f43906e6d079636da729334fc02ca8352 /index.pl
parentcad349a58334474066c8bcf30e1dddd2d2964ac7 (diff)
add support for /station.json
Diffstat (limited to 'index.pl')
-rw-r--r--index.pl3
1 files changed, 3 insertions, 0 deletions
diff --git a/index.pl b/index.pl
index 3e6332f..6df49ea 100644
--- a/index.pl
+++ b/index.pl
@@ -397,6 +397,9 @@ sub handle_request {
$self->param( station => $station );
$self->stash( layout => 'text' );
}
+ elsif ( defined $station and $station =~ s{ [.] json $ }{}x ) {
+ $template = 'json';
+ }
# Historically, there were two JSON APIs: 'json' (undocumented, raw
# passthrough of serialized Travel::Status::DE::IRIS::Result /