Add /version route
This commit is contained in:
parent
d775ae2ce6
commit
c3b45276a3
@ -4,6 +4,7 @@
|
||||
remarks_per_page => 5,
|
||||
results_per_page => 5,
|
||||
body_max_length => 8_000,
|
||||
version => 'Feb 11 2025',
|
||||
secrets => ['t0p_s3cr3t'],
|
||||
development => {
|
||||
pg_string =>
|
||||
|
@ -142,6 +142,13 @@ sub startup($self) {
|
||||
$c->redirect_to('threads_list');
|
||||
});
|
||||
|
||||
# Hide a version string to check build later
|
||||
if (my $version = $self->config->{'version'}) {
|
||||
$r->get('/version', sub ($c) {
|
||||
$c->render(text => $version)
|
||||
});
|
||||
}
|
||||
|
||||
# Static pages
|
||||
$r->get('/about')->to('page#about')->name('about_page');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user