summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2022-10-17 09:51:58 +0200
committerDaniel Friesel <derf@finalrewind.org>2022-10-17 09:51:58 +0200
commit968a83de9682edd20480526d51ea82343f6588db (patch)
tree81ccc91159e76f67140f74bac7129148bbde36f2
parent834ceb92d6097f5cddd24a7ca23170a58c085e17 (diff)
journey: destination => direction
-rw-r--r--lib/Travel/Status/DE/HAFAS/Journey.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Travel/Status/DE/HAFAS/Journey.pm b/lib/Travel/Status/DE/HAFAS/Journey.pm
index 0e3d52f..8a541b3 100644
--- a/lib/Travel/Status/DE/HAFAS/Journey.pm
+++ b/lib/Travel/Status/DE/HAFAS/Journey.pm
@@ -30,7 +30,7 @@ sub new {
my $date = $journey->{date};
- my $destination = $journey->{dirTxt};
+ my $direction = $journey->{dirTxt};
my $is_cancelled = $journey->{isCncl};
my $jid = $journey->{jid};
@@ -126,7 +126,7 @@ sub new {
is_cancelled => $is_cancelled,
train => $train,
operator => $operator,
- destination => $destination,
+ direction => $direction,
route_end => $stops[-1]{name},
messages => \@messages,
route => \@stops,
@@ -140,6 +140,9 @@ sub new {
$ref->{destination} = $ref->{route_end};
}
}
+ else {
+ $ref->{route_start} = $stops[0]{name};
+ }
bless( $ref, $obj );