Mere get/post routes for the feedback form

master
Daniel Berteaud 10 years ago
parent adf3e3b73a
commit 8c80309184
  1. 17
      vroom.pl

@ -1479,17 +1479,14 @@ get '/documentation' => sub {
);
} => 'documentation';
# Routes for feedback. One get to display the form
# and one post to get data from it
get '/feedback' => sub {
# Route for feedback form
any [ qw(GET POST) ] => '/feedback' => sub {
my $self = shift;
$self->stash(
page => 'feedback'
);
} => 'feedback';
post '/feedback' => sub {
my $self = shift;
if ($self->req->method eq 'GET'){
return $self->render('feedback',
page => 'feedback'
);
}
my $email = $self->param('email') || '';
my $comment = $self->param('comment');
my $sent = $self->mail(

Loading…
Cancel
Save