Skip to content

Commit

Permalink
last phone number references removed, pt2
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmenendez committed Nov 6, 2024
1 parent a01b72a commit 9cec269
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions api/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,13 +260,8 @@ func (a *API) resendUserVerificationCodeHandler(w http.ResponseWriter, r *http.R
ErrInvalidUserData.With("no email provided").Write(w)
return
}
var err error
var user *db.User
// get the user information from the database by email
if verification.Email != "" {
user, err = a.db.UserByEmail(verification.Email)
}
// check the error getting the user information
user, err := a.db.UserByEmail(verification.Email)
if err != nil {
if err == db.ErrNotFound {
ErrUnauthorized.Write(w)
Expand Down

0 comments on commit 9cec269

Please sign in to comment.