Added initial admin login page and backend page with authentication
This commit is contained in:
parent
998259f0ae
commit
61d609861a
5 changed files with 116 additions and 1 deletions
|
@ -15,4 +15,18 @@ sub under {
|
|||
return undef;
|
||||
}
|
||||
|
||||
sub login {
|
||||
my $c = shift;
|
||||
|
||||
if ( $c->authenticate($c->param('email'), $c->param('password')) ) {
|
||||
$c->redirect_to('/admin/home');
|
||||
} else {
|
||||
$c->redirect_to('/admin');
|
||||
}
|
||||
}
|
||||
|
||||
sub home {
|
||||
my $c = shift;
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
Reference in a new issue