Loading index.pl +13 −5 Original line number Diff line number Diff line Loading @@ -64,6 +64,11 @@ sub handle_request { my $backend = $self->param('backend') // 'ris'; my $callback = $self->param('callback'); my $api_version = $backend eq 'iris' ? $Travel::Status::DE::IRIS::VERSION : $Travel::Status::DE::DeutscheBahn::VERSION; $self->stash( departures => [] ); $self->stash( title => 'db-fakedisplay' ); $self->stash( version => $VERSION ); Loading @@ -87,6 +92,7 @@ sub handle_request { Travel::Status::DE::IRIS::Stations::get_station($station); $json = $self->render_to_string( json => { api_version => $api_version, version => $VERSION, error => 'ambiguous station code/name', candidates => \@candidates, Loading @@ -96,6 +102,7 @@ sub handle_request { else { $json = $self->render_to_string( json => { api_version => $api_version, version => $VERSION, error => 'unknown station code/name', } Loading Loading @@ -235,6 +242,7 @@ sub handle_request { if ( $template eq 'json' ) { my $json = $self->render_to_string( json => { api_version => $api_version, preformatted => \@departures, version => $VERSION, raw => \@results, Loading Loading
index.pl +13 −5 Original line number Diff line number Diff line Loading @@ -64,6 +64,11 @@ sub handle_request { my $backend = $self->param('backend') // 'ris'; my $callback = $self->param('callback'); my $api_version = $backend eq 'iris' ? $Travel::Status::DE::IRIS::VERSION : $Travel::Status::DE::DeutscheBahn::VERSION; $self->stash( departures => [] ); $self->stash( title => 'db-fakedisplay' ); $self->stash( version => $VERSION ); Loading @@ -87,6 +92,7 @@ sub handle_request { Travel::Status::DE::IRIS::Stations::get_station($station); $json = $self->render_to_string( json => { api_version => $api_version, version => $VERSION, error => 'ambiguous station code/name', candidates => \@candidates, Loading @@ -96,6 +102,7 @@ sub handle_request { else { $json = $self->render_to_string( json => { api_version => $api_version, version => $VERSION, error => 'unknown station code/name', } Loading Loading @@ -235,6 +242,7 @@ sub handle_request { if ( $template eq 'json' ) { my $json = $self->render_to_string( json => { api_version => $api_version, preformatted => \@departures, version => $VERSION, raw => \@results, Loading