Api: perltidy

This commit is contained in:
Birte Kristina Friesel 2024-10-23 20:07:48 +02:00
parent 496279e05c
commit 3e2e9cf71d
No known key found for this signature in database
GPG key ID: B63118F7196EA660

View file

@ -182,7 +182,7 @@ sub travel_v1 {
my $from_station = sanitize( q{}, $payload->{fromStation} ); my $from_station = sanitize( q{}, $payload->{fromStation} );
my $to_station = sanitize( q{}, $payload->{toStation} ); my $to_station = sanitize( q{}, $payload->{toStation} );
my $train_id; my $train_id;
my $hafas = sanitize(undef, $payload->{hafas}); my $hafas = sanitize( undef, $payload->{hafas} );
$hafas //= exists $payload->{train}{journeyID} ? 'DB' : undef; $hafas //= exists $payload->{train}{journeyID} ? 'DB' : undef;
if ( if (
@ -673,7 +673,8 @@ sub autocomplete {
= "document.addEventListener('DOMContentLoaded',function(){M.Autocomplete.init(document.querySelectorAll('.autocomplete'),{\n"; = "document.addEventListener('DOMContentLoaded',function(){M.Autocomplete.init(document.querySelectorAll('.autocomplete'),{\n";
$output .= 'minLength:3,limit:50,data:'; $output .= 'minLength:3,limit:50,data:';
$output $output
.= encode_json( $self->stations->get_for_autocomplete( backend_id => $backend_id ) ); .= encode_json(
$self->stations->get_for_autocomplete( backend_id => $backend_id ) );
$output .= "\n});});\n"; $output .= "\n});});\n";
$self->render( $self->render(