Implement the /message/:id route
This commit is contained in:
parent
80b2acb79a
commit
1809a765f2
|
@ -132,6 +132,14 @@ any [qw{GET POST}], '/sign' => sub ($c) {
|
||||||
$c->render();
|
$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
|
# Send it
|
||||||
app->secrets(app->config->{'secrets'}) || die $@;
|
app->secrets(app->config->{'secrets'}) || die $@;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user