summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Controller
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Travelynx/Controller')
-rwxr-xr-xlib/Travelynx/Controller/Api.pm6
1 files changed, 5 insertions, 1 deletions
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 => {