summaryrefslogtreecommitdiff
path: root/lib/DBInfoscreen.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.pm
parent160651f0bb465074b3b6ff1a0faa613da5586fb1 (diff)
allow hafas-rest-api endpoint to be configured
This allows selfhosted installations to be used
Diffstat (limited to 'lib/DBInfoscreen.pm')
-rw-r--r--lib/DBInfoscreen.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/DBInfoscreen.pm b/lib/DBInfoscreen.pm
index 7a0bea4..b9b850d 100644
--- a/lib/DBInfoscreen.pm
+++ b/lib/DBInfoscreen.pm
@@ -30,6 +30,8 @@ sub startup {
my ($self) = @_;
$self->config(
+ hafas_rest_api => $ENV{DBFAKEDISPLAY_HAFAS_API}
+ // 'https://v5.db.transport.rest',
hypnotoad => {
accepts => $ENV{DBFAKEDISPLAY_ACCEPTS} // 100,
clients => $ENV{DBFAKEDISPLAY_CLIENTS} // 10,
@@ -142,6 +144,7 @@ sub startup {
hafas => sub {
my ($self) = @_;
state $hafas = DBInfoscreen::Helper::HAFAS->new(
+ api => $self->config->{hafas_rest_api},
log => $self->app->log,
main_cache => $self->app->cache_iris_main,
realtime_cache => $self->app->cache_iris_rt,