Don't need validation unless it's a POST (probably should re-think this whole route)

This commit is contained in:
swagg boi 2022-04-09 00:54:58 -04:00
parent c0070041b7
commit bfb9102d51

View file

@ -62,7 +62,7 @@ under sub ($c) {
get '/' => sub ($c) { $c->redirect_to(page => {page => 'view'}) }; get '/' => sub ($c) { $c->redirect_to(page => {page => 'view'}) };
any [qw{GET POST}], '/sign' => sub ($c) { any [qw{GET POST}], '/sign' => sub ($c) {
my $v = $c->validation(); my $v = $c->validation() if $c->req->method eq 'POST';
if ($c->req->method eq 'POST' && $v->has_data) { if ($c->req->method eq 'POST' && $v->has_data) {
my $name = $c->param('name') || 'Anonymous'; my $name = $c->param('name') || 'Anonymous';