Added logging on admin login endpoint
This commit is contained in:
parent
832dab70cb
commit
b92ea1f7c6
1 changed files with 3 additions and 0 deletions
|
@ -38,9 +38,12 @@ sub home {
|
||||||
sub auth_login {
|
sub auth_login {
|
||||||
my $c = shift;
|
my $c = shift;
|
||||||
|
|
||||||
|
$c->app->log->debug( __PACKAGE__ . " admin login attempt for [" . $c->param('email') . "]" );
|
||||||
|
|
||||||
if ( $c->authenticate($c->param('email'), $c->param('password')) ) {
|
if ( $c->authenticate($c->param('email'), $c->param('password')) ) {
|
||||||
$c->redirect_to('/admin/home');
|
$c->redirect_to('/admin/home');
|
||||||
} else {
|
} else {
|
||||||
|
$c->app->log->info( __PACKAGE__ . " failed admin login for [" . $c->param('email') . "]" );
|
||||||
$c->redirect_to('/admin');
|
$c->redirect_to('/admin');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue