From c0070041b7c90192e1883230f2c7583c64c6e20d Mon Sep 17 00:00:00 2001 From: swag Date: Sat, 9 Apr 2022 00:52:16 -0400 Subject: [PATCH] Fix the named route for page (/view) --- guestbook-ng.pl | 4 ++-- templates/layouts/default.html.ep | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/guestbook-ng.pl b/guestbook-ng.pl index 835c5db..75c08b0 100755 --- a/guestbook-ng.pl +++ b/guestbook-ng.pl @@ -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'}); } } diff --git a/templates/layouts/default.html.ep b/templates/layouts/default.html.ep index e186944..107ef80 100644 --- a/templates/layouts/default.html.ep +++ b/templates/layouts/default.html.ep @@ -20,8 +20,8 @@

Swagg::Net::Guestbook

<% if (flash 'error') { =%>