summaryrefslogtreecommitdiff
path: root/lib/DBInfoscreen/Helper/HAFAS.pm
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2021-03-30 20:28:02 +0200
committerDaniel Friesel <derf@finalrewind.org>2021-03-30 20:28:02 +0200
commit413647661ac92feb38cafec3033cbc7bd07c5dc0 (patch)
treed1655599308cd14ef45d58e32ceaa5f06963d906 /lib/DBInfoscreen/Helper/HAFAS.pm
parent160651f0bb465074b3b6ff1a0faa613da5586fb1 (diff)
allow hafas-rest-api endpoint to be configured
This allows selfhosted installations to be used
Diffstat (limited to 'lib/DBInfoscreen/Helper/HAFAS.pm')
-rw-r--r--lib/DBInfoscreen/Helper/HAFAS.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/DBInfoscreen/Helper/HAFAS.pm b/lib/DBInfoscreen/Helper/HAFAS.pm
index 8c11412..a421c38 100644
--- a/lib/DBInfoscreen/Helper/HAFAS.pm
+++ b/lib/DBInfoscreen/Helper/HAFAS.pm
@@ -379,8 +379,8 @@ sub get_route_timestamps_p {
sub get_polyline_p {
my ( $self, $trip_id, $line ) = @_;
- my $url
- = "https://v5.db.transport.rest/trips/${trip_id}?lineName=${line}&polyline=true";
+ my $api = $self->{api};
+ my $url = "${api}/trips/${trip_id}?lineName=${line}&polyline=true";
my $cache = $self->{realtime_cache};
my $promise = Mojo::Promise->new;