Skip to content

Commit

Permalink
fix this to use redirect rather than forward
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Closs committed Jul 18, 2012
1 parent c8ec8e7 commit 1333fe0
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/Biopay.pm
Expand Up @@ -70,10 +70,9 @@ hook before => sub {
} }


debug "no bio session, redirecting to login (from $path)"; debug "no bio session, redirecting to login (from $path)";
forward ($path =~ m{^/member/} ? '/login' : '/admin-login'), { session message => 'Please log-in first.';
message => "Please log-in first.", session path => $path;
path => $path, return redirect $path =~ m{^/member/} ? '/login' : '/admin-login';
}, { method => 'GET' };
}; };


get '/' => sub { get '/' => sub {
Expand Down Expand Up @@ -138,8 +137,10 @@ get '/stats-widget.js' => sub {
}; };


get '/login' => sub { get '/login' => sub {
my $msg = param('message') || session('message') || '';
session 'message' => '' if $msg;
template 'login' => { template 'login' => {
message => param('message') || '', message => $msg,
path => param('path') || session('path'), path => param('path') || session('path'),
}; };
}; };
Expand Down

0 comments on commit 1333fe0

Please sign in to comment.