Implement the /message/:id route

This commit is contained in:
swagg boi 2022-04-04 21:21:11 -04:00
parent 80b2acb79a
commit 1809a765f2

View file

@ -132,6 +132,14 @@ any [qw{GET POST}], '/sign' => sub ($c) {
$c->render();
};
under '/message';
get '/:id', [id => qr/[0-9]+/] => sub ($c) {
my $message_id = $c->param('id');
$c->render(text => "You've requested message number: $message_id");
};
# Send it
app->secrets(app->config->{'secrets'}) || die $@;