summaryrefslogtreecommitdiff
path: root/index.pl
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2015-10-10 15:29:46 +0200
committerDaniel Friesel <derf@finalrewind.org>2015-10-10 15:29:46 +0200
commitff86b4c31357b4c93c012c40fa3d5ca511361b31 (patch)
treed2438d14e54b01bf8910526c97752991c648f19d /index.pl
parentd35c577924d282e4ee6d4afb27f7b473f20ab0cd (diff)
marudor frontend always uses iris backend
Diffstat (limited to 'index.pl')
-rw-r--r--index.pl7
1 files changed, 4 insertions, 3 deletions
diff --git a/index.pl b/index.pl
index bfa5031..5dc9037 100644
--- a/index.pl
+++ b/index.pl
@@ -142,7 +142,7 @@ helper 'handle_no_results' => sub {
return;
};
-helper 'handle_no_results_marudor' => sub {
+helper 'handle_no_results_json' => sub {
my ( $self, $backend, $station, $errstr, $api_version, $callback ) = @_;
$self->res->headers->access_control_allow_origin(q{*});
@@ -316,7 +316,8 @@ sub handle_request {
return;
}
- if ( $template eq 'marudor' and $backend eq 'iris' ) {
+ if ( $template eq 'marudor' ) {
+ $backend = 'iris';
$opt{lookahead} = 120;
}
@@ -327,7 +328,7 @@ sub handle_request {
my @results = @{$results_ref};
if ( not @results and $template ~~ [qw[json marudor]] ) {
- $self->handle_no_results_marudor( $backend, $station, $errstr,
+ $self->handle_no_results_json( $backend, $station, $errstr,
$api_version, $callback );
return;
}