diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2024-04-24 19:54:24 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2024-04-24 19:54:24 +0200 |
commit | f51b692a69bb6efdba4017e30b16e2a29d783bfc (patch) | |
tree | 30cb80bb3dc61f6cd5977ed7204d96fc0ea3c758 /lib/DBInfoscreen.pm | |
parent | a85266ef8432271d988f00e83da9f5ed350f7097 (diff) |
stationboard: handle accept: application/json as well
Diffstat (limited to 'lib/DBInfoscreen.pm')
-rw-r--r-- | lib/DBInfoscreen.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/DBInfoscreen.pm b/lib/DBInfoscreen.pm index 49e7402..c784e96 100644 --- a/lib/DBInfoscreen.pm +++ b/lib/DBInfoscreen.pm @@ -289,7 +289,8 @@ sub startup { $r->get('/')->to('stationboard#handle_request'); $r->get('/multi/*station')->to('stationboard#handle_request'); - $r->get('/*station')->to('stationboard#handle_request'); + $r->get( '/*station' => [ format => [ 'html', 'json' ] ] ) + ->to( 'stationboard#handle_request', format => undef ); $self->types->type( json => 'application/json; charset=utf-8' ); |