From 1fff115bab4de7ff235f6d6a34ed73035152a24a Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 26 Jan 2020 08:47:15 +0100 Subject: JSON API: avoid warning on non-integer api version requests --- lib/DBInfoscreen/Controller/Stationboard.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/DBInfoscreen/Controller/Stationboard.pm') 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( -- cgit v1.2.3