summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2018-09-14 20:16:37 +0200
committerDaniel Friesel <derf@finalrewind.org>2018-09-14 20:16:37 +0200
commit3198689286984a47d0250712d9928c7a9ff2f7b9 (patch)
tree515e73baab9b64db85130d4e3e5dfb36c23c3d75
parentb12b201c4d598fae2eec3df8dbac810ddc9861f4 (diff)
index.pl: Fix mistaken usage of get_user_id
-rw-r--r--index.pl10
1 files changed, 5 insertions, 5 deletions
diff --git a/index.pl b/index.pl
index a77603a..dcc941c 100644
--- a/index.pl
+++ b/index.pl
@@ -190,7 +190,7 @@ sub epoch_to_dt {
sub get_departures {
my ( $station, $lookbehind ) = @_;
- $lookbehind //= 20;
+ $lookbehind //= 60;
my @station_matches
= Travel::Status::DE::IRIS::Stations::get_station($station);
@@ -290,7 +290,7 @@ helper 'checkout' => sub {
if ( not defined $train ) {
if ($force) {
my $success = $self->app->checkout_query->execute(
- $self->app->get_user_id,
+ $self->get_user_id,
$self->get_station_id(
ds100 => $status->{station_ds100},
name => $status->{station_name}
@@ -312,7 +312,7 @@ helper 'checkout' => sub {
}
else {
my $success = $self->app->checkout_query->execute(
- $self->app->get_user_id,
+ $self->get_user_id,
$self->get_station_id(
ds100 => $status->{station_ds100},
name => $status->{station_name}
@@ -322,8 +322,8 @@ helper 'checkout' => sub {
$train->line_no,
$train->train_no,
$train->train_id,
- $train->sched_departure->epoch,
- $train->departure->epoch,
+ $train->sched_arrival ? $train->sched_arrival->epoch : undef,
+ $train->arrival ? $train->arrival->epoch : undef,
join( '|', $train->route ),
join( '|',
map { ( $_->[0] ? $_->[0]->epoch : q{} ) . ':' . $_->[1] }