diff options
author | Daniel Friesel <derf@finalrewind.org> | 2020-01-26 08:47:15 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2020-01-26 08:47:15 +0100 |
commit | 1fff115bab4de7ff235f6d6a34ed73035152a24a (patch) | |
tree | 6cba7ff51a67c1537ef481be4c557f3be1b9cfc6 | |
parent | cc64206097ea4a5ece1f09e3533ada1ab123e990 (diff) |
JSON API: avoid warning on non-integer api version requests
-rw-r--r-- | lib/DBInfoscreen/Controller/Stationboard.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm index 59ee48d..9eb24f3 100644 --- a/lib/DBInfoscreen/Controller/Stationboard.pm +++ b/lib/DBInfoscreen/Controller/Stationboard.pm @@ -820,7 +820,7 @@ sub handle_request { my @json_route = $self->json_route_diff( [ $result->route ], [ $result->sched_route ] ); - if ( $apiver == 1 ) { + if ( $apiver eq '1' ) { push( @departures, { @@ -856,7 +856,7 @@ sub handle_request { } ); } - elsif ( $apiver == 2 ) { + elsif ( $apiver eq '2' ) { my ( $delay_arr, $delay_dep, $sched_arr, $sched_dep ); if ( $result->arrival ) { $delay_arr = $result->arrival->subtract_datetime( |