summaryrefslogtreecommitdiff
path: root/index.pl
diff options
context:
space:
mode:
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 /