Skip to content

Commit

Permalink
admin/login: fix error message & status code
Browse files Browse the repository at this point in the history
Signed-off-by: Sumner Evans <[email protected]>
  • Loading branch information
sumnerevans committed Jan 8, 2024
1 parent 2e15274 commit e583ec8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@ func (a *Application) HandleAdminLogin(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusBadRequest)
return
} else if !isAdmin {
log.Warn().Err(err).Msg("teacher email not confirmed, not sending login code to avoid amplification attacks")
w.WriteHeader(http.StatusBadRequest)
log.Warn().Err(err).Msg("user is not an admin, not sending email")
w.WriteHeader(http.StatusForbidden)
return
}

Expand Down

0 comments on commit e583ec8

Please sign in to comment.