Fix the named route for page (/view)

This commit is contained in:
swagg boi 2022-04-09 00:52:16 -04:00
parent ad75cd76ec
commit c0070041b7
2 changed files with 4 additions and 4 deletions

View file

@ -59,7 +59,7 @@ under sub ($c) {
1;
};
get '/' => sub ($c) { $c->redirect_to('/view') };
get '/' => sub ($c) { $c->redirect_to(page => {page => 'view'}) };
any [qw{GET POST}], '/sign' => sub ($c) {
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;
return $c->redirect_to('/view');
return $c->redirect_to(page => {page => 'view'});
}
}

View file

@ -20,8 +20,8 @@
<div class="outer">
<h1 id="top">Swagg::Net::Guestbook</h1>
<nav>
<%= link_to View => '/view' %>
<%= link_to Sign => '/sign' %>
<%= link_to View => page => {page => 'view'} %>
<%= link_to Sign => 'sign' %>
<%= link_to Home => 'https://www.swagg.net' %>
</nav>
<% if (flash 'error') { =%>