Add /version route

This commit is contained in:
swagg boi 2025-02-11 16:11:37 -05:00
parent d775ae2ce6
commit c3b45276a3
2 changed files with 8 additions and 0 deletions

View File

@ -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 =>

View File

@ -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');