diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-02-24 10:29:58 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-02-24 10:29:58 +0100 |
commit | 4cca413880a17d9d31f5ed5c27a29286274ba290 (patch) | |
tree | 3dfc5a7f43906e6d079636da729334fc02ca8352 /index.pl | |
parent | cad349a58334474066c8bcf30e1dddd2d2964ac7 (diff) |
add support for /station.json
Diffstat (limited to 'index.pl')
-rw-r--r-- | index.pl | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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 / |