From 4cca413880a17d9d31f5ed5c27a29286274ba290 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 24 Feb 2019 10:29:58 +0100 Subject: add support for /station.json --- index.pl | 3 +++ 1 file changed, 3 insertions(+) (limited to 'index.pl') 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 / -- cgit v1.2.3