diff options
| author | Birte Kristina Friesel <derf@finalrewind.org> | 2023-07-10 20:57:27 +0200 | 
|---|---|---|
| committer | Birte Kristina Friesel <derf@finalrewind.org> | 2023-07-10 20:57:27 +0200 | 
| commit | a4d60a03f68e29e68f341b339f48cae452f8a383 (patch) | |
| tree | 2c2c0c9780bdd14c89c6989de95e5c03c616c8c9 /lib | |
| parent | 51350ffe354da47baa24826ea1e55044083ee5c4 (diff) | |
pass version via defaults4.16.6
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/DBInfoscreen.pm | 1 | ||||
| -rw-r--r-- | lib/DBInfoscreen/Controller/Static.pm | 1 | ||||
| -rw-r--r-- | lib/DBInfoscreen/Controller/Stationboard.pm | 5 | 
3 files changed, 1 insertions, 6 deletions
| diff --git a/lib/DBInfoscreen.pm b/lib/DBInfoscreen.pm index bc0f181..fd3ed0b 100644 --- a/lib/DBInfoscreen.pm +++ b/lib/DBInfoscreen.pm @@ -38,6 +38,7 @@ sub startup {  	);  	chomp $self->config->{version}; +	$self->defaults( version => $self->config->{version} // 'UNKNOWN' );  	# Generally, the reverse proxy handles compression.  	# Also, Mojolicious compression breaks legacy callback-based JSON endpoints diff --git a/lib/DBInfoscreen/Controller/Static.pm b/lib/DBInfoscreen/Controller/Static.pm index e9ca6cf..4560d02 100644 --- a/lib/DBInfoscreen/Controller/Static.pm +++ b/lib/DBInfoscreen/Controller/Static.pm @@ -70,7 +70,6 @@ sub about {  	$self->render(  		'about',  		hide_opts => 1, -		version   => $self->config->{version}  	);  } diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm index 912d95d..8fb57a2 100644 --- a/lib/DBInfoscreen/Controller/Stationboard.pm +++ b/lib/DBInfoscreen/Controller/Stationboard.pm @@ -131,7 +131,6 @@ sub handle_no_results_json {  	if ($errstr) {  		$json = {  			api_version => $api_version, -			version     => $self->config->{version},  			error       => $errstr,  		};  	} @@ -143,7 +142,6 @@ sub handle_no_results_json {  		{  			$json = {  				api_version => $api_version, -				version     => $self->config->{version},  				error       => 'ambiguous station code/name',  				candidates  => \@candidates,  			}; @@ -151,7 +149,6 @@ sub handle_no_results_json {  		else {  			$json = {  				api_version => $api_version, -				version     => $self->config->{version},  				error       => ( $errstr // "Got no results for '$station'" )  			};  		} @@ -403,7 +400,6 @@ sub handle_request {  	$self->stash( departures => [] );  	$self->stash( title      => 'DBF' ); -	$self->stash( version    => $self->config->{version} );  	if ( not( $template ~~ [qw[app infoscreen json multi single text]] ) ) {  		$template = 'app'; @@ -1110,7 +1106,6 @@ sub train_details {  	$self->stash( departures => [] );  	$self->stash( title      => 'DBF' ); -	$self->stash( version    => $self->config->{version} );  	my $res = {  		train_type      => undef, | 
