Loading cpanfile +1 −1 Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ requires 'LWP::UserAgent'; requires 'LWP::Protocol::https'; requires 'Mojolicious'; requires 'Travel::Status::DE::DBRIS::Formation', '>= 0.04'; requires 'Travel::Status::DE::EFA', '>= 3.06'; requires 'Travel::Status::DE::EFA', '>= 3.08'; requires 'Travel::Status::DE::HAFAS', '>= 5.06'; requires 'Travel::Status::DE::IRIS'; requires 'XML::LibXML'; lib/DBInfoscreen/Controller/Stationboard.pm +22 −10 Original line number Diff line number Diff line Loading @@ -50,12 +50,22 @@ sub handle_no_results { my $errstr = $data->{errstr}; if ($efa) { if ( $errstr =~ m{ambiguous} and $efa->name_candidates ) { $self->render( 'landingpage', stationlist => [ $efa->name_candidates ], hide_opts => 0, status => $data->{status} // 300, ); } else { $self->render( 'landingpage', error => ( $errstr // "Keine Abfahrten an '$station'" ), hide_opts => 0, status => $data->{status} // 404, ); } return; } elsif ($hafas) { Loading Loading @@ -579,13 +589,14 @@ sub handle_request { } )->catch( sub { my ($err) = @_; my ( $err, $status ) = @_; if ( $template eq 'json' ) { $self->handle_no_results_json( $station, { errstr => $err, status => ( $err =~ m{Ambiguous|LOCATION} ? 300 : 500 ), status => ( $err =~ m{[Aa]mbiguous|LOCATION} ? 300 : 500 ), }, $api_version ); Loading @@ -595,9 +606,10 @@ sub handle_request { $station, { errstr => $err, status => ( $err =~ m{Ambiguous|LOCATION} ? 300 : 500 ), status => ( $err =~ m{[Aa]mbiguous|LOCATION} ? 300 : 500 ), }, $hafas, $efa $hafas, $efa ? $status : undef ); return; } Loading Loading
cpanfile +1 −1 Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ requires 'LWP::UserAgent'; requires 'LWP::Protocol::https'; requires 'Mojolicious'; requires 'Travel::Status::DE::DBRIS::Formation', '>= 0.04'; requires 'Travel::Status::DE::EFA', '>= 3.06'; requires 'Travel::Status::DE::EFA', '>= 3.08'; requires 'Travel::Status::DE::HAFAS', '>= 5.06'; requires 'Travel::Status::DE::IRIS'; requires 'XML::LibXML';
lib/DBInfoscreen/Controller/Stationboard.pm +22 −10 Original line number Diff line number Diff line Loading @@ -50,12 +50,22 @@ sub handle_no_results { my $errstr = $data->{errstr}; if ($efa) { if ( $errstr =~ m{ambiguous} and $efa->name_candidates ) { $self->render( 'landingpage', stationlist => [ $efa->name_candidates ], hide_opts => 0, status => $data->{status} // 300, ); } else { $self->render( 'landingpage', error => ( $errstr // "Keine Abfahrten an '$station'" ), hide_opts => 0, status => $data->{status} // 404, ); } return; } elsif ($hafas) { Loading Loading @@ -579,13 +589,14 @@ sub handle_request { } )->catch( sub { my ($err) = @_; my ( $err, $status ) = @_; if ( $template eq 'json' ) { $self->handle_no_results_json( $station, { errstr => $err, status => ( $err =~ m{Ambiguous|LOCATION} ? 300 : 500 ), status => ( $err =~ m{[Aa]mbiguous|LOCATION} ? 300 : 500 ), }, $api_version ); Loading @@ -595,9 +606,10 @@ sub handle_request { $station, { errstr => $err, status => ( $err =~ m{Ambiguous|LOCATION} ? 300 : 500 ), status => ( $err =~ m{[Aa]mbiguous|LOCATION} ? 300 : 500 ), }, $hafas, $efa $hafas, $efa ? $status : undef ); return; } Loading