Don't require name to post

This commit is contained in:
swagg boi 2021-12-31 23:05:34 -05:00
parent 31d25936e2
commit fb8cc6427e

View file

@ -61,8 +61,8 @@ get '/' => sub ($c) {
} => 'index'; } => 'index';
any [qw{GET POST}], '/sign' => sub ($c) { any [qw{GET POST}], '/sign' => sub ($c) {
if ($c->param('name') && $c->param('message')) { if ($c->req->method() eq 'POST' && $c->param('message')) {
my $name = $c->param('name'); my $name = $c->param('name') || 'Anonymous';
my $message = $c->param('message'); my $message = $c->param('message');
my $answer = $c->param('answer'); my $answer = $c->param('answer');