Added logging on admin login endpoint

This commit is contained in:
Tom Bloor 2017-11-21 10:42:23 +00:00
parent addd5c640c
commit 9f4d39e029
No known key found for this signature in database
GPG key ID: 4657C7EBE42CC5CC

View file

@ -38,9 +38,12 @@ sub home {
sub auth_login {
my $c = shift;
$c->app->log->debug( __PACKAGE__ . " admin login attempt for [" . $c->param('email') . "]" );
if ( $c->authenticate($c->param('email'), $c->param('password')) ) {
$c->redirect_to('/admin/home');
} else {
$c->app->log->info( __PACKAGE__ . " failed admin login for [" . $c->param('email') . "]" );
$c->redirect_to('/admin');
}
}