summaryrefslogtreecommitdiff
path: root/index.pl
diff options
context:
space:
mode:
Diffstat (limited to 'index.pl')
-rw-r--r--index.pl8
1 files changed, 7 insertions, 1 deletions
diff --git a/index.pl b/index.pl
index dc689d5..f931d92 100644
--- a/index.pl
+++ b/index.pl
@@ -69,7 +69,7 @@ sub get_results_for {
};
$cache->freeze( $cache_str, $data );
}
- else {
+ elsif ( $backend eq 'ris' ) {
my $status = Travel::Status::DE::HAFAS->new(
station => $station,
excluded_mots => [qw[bus ferry ondemand tram u]],
@@ -81,6 +81,12 @@ sub get_results_for {
};
$cache->freeze( $cache_str, $data );
}
+ else {
+ $data = {
+ results => [],
+ errstr => "Backend '$backend' not supported",
+ };
+ }
}
return $data;