From a3149adddd77d2d9d35d08d24b38dca02eff00cb Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 5 Sep 2020 21:51:52 +0200 Subject: Fix checkin via API. Broken by 717cc18a403d6705c64a9a6fd43578c1efbb159f Closes #44 --- lib/Travelynx/Controller/Api.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/Travelynx/Controller/Api.pm b/lib/Travelynx/Controller/Api.pm index 6ffd310..c7e58a9 100755 --- a/lib/Travelynx/Controller/Api.pm +++ b/lib/Travelynx/Controller/Api.pm @@ -223,7 +223,11 @@ sub travel_v1 { else { my $train_type = sanitize( q{}, $payload->{train}{type} ); my $train_no = sanitize( q{}, $payload->{train}{no} ); - my $status = $self->get_departures( $from_station, 140, 40, 0 ); + my $status = $self->iris->get_departures( + station => $from_station, + lookbehind => 140, + lookahead => 40 + ); if ( $status->{errstr} ) { $self->render( json => { -- cgit v1.2.3