diff options
author | Daniel Friesel <derf@finalrewind.org> | 2021-10-30 10:02:58 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2021-10-30 10:02:58 +0200 |
commit | ed0054fa50da9e4a3e08ef069b8b5bbc9709934f (patch) | |
tree | 26a60ee1ffb84c60f275ff22f651bb9b30151c0a /lib/Travelynx.pm | |
parent | 2695442199d4db66bc70170cfc1aba894ddba545 (diff) |
Allow usage of custom hafas-rest-api instances
Diffstat (limited to 'lib/Travelynx.pm')
-rwxr-xr-x | lib/Travelynx.pm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Travelynx.pm b/lib/Travelynx.pm index 91de1c6..d7f9128 100755 --- a/lib/Travelynx.pm +++ b/lib/Travelynx.pm @@ -93,6 +93,8 @@ sub startup { $self->secrets( $self->config->{secrets} ); } + $self->config->{backend}{hafas_rest_api} //= 'https://v5.db.transport.rest'; + chomp $self->config->{version}; $self->plugin( @@ -279,6 +281,7 @@ sub startup { my ($self) = @_; state $hafas = Travelynx::Helper::HAFAS->new( log => $self->app->log, + hafas_rest_api => $self->app->config->{backend}{hafas_rest_api}, main_cache => $self->app->cache_iris_main, realtime_cache => $self->app->cache_iris_rt, root_url => $self->url_for('/')->to_abs, |