Fix the named route for page (/view)
This commit is contained in:
parent
ad75cd76ec
commit
c0070041b7
|
@ -59,7 +59,7 @@ under sub ($c) {
|
||||||
1;
|
1;
|
||||||
};
|
};
|
||||||
|
|
||||||
get '/' => sub ($c) { $c->redirect_to('/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();
|
||||||
|
@ -83,7 +83,7 @@ any [qw{GET POST}], '/sign' => sub ($c) {
|
||||||
|
|
||||||
$c->flash(error => 'This message was flagged as spam') if $spam;
|
$c->flash(error => 'This message was flagged as spam') if $spam;
|
||||||
|
|
||||||
return $c->redirect_to('/view');
|
return $c->redirect_to(page => {page => 'view'});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,8 +20,8 @@
|
||||||
<div class="outer">
|
<div class="outer">
|
||||||
<h1 id="top">Swagg::Net::Guestbook</h1>
|
<h1 id="top">Swagg::Net::Guestbook</h1>
|
||||||
<nav>
|
<nav>
|
||||||
<%= link_to View => '/view' %>
|
<%= link_to View => page => {page => 'view'} %>
|
||||||
<%= link_to Sign => '/sign' %>
|
<%= link_to Sign => 'sign' %>
|
||||||
<%= link_to Home => 'https://www.swagg.net' %>
|
<%= link_to Home => 'https://www.swagg.net' %>
|
||||||
</nav>
|
</nav>
|
||||||
<% if (flash 'error') { =%>
|
<% if (flash 'error') { =%>
|
||||||
|
|
Loading…
Reference in a new issue