Skip to content

Commit

Permalink
update error message
Browse files Browse the repository at this point in the history
  • Loading branch information
Linesmerrill committed Jun 1, 2024
1 parent 3ee1b65 commit a577a86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/handlers/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func (u User) UserCreateHandler(w http.ResponseWriter, r *http.Request) {
// check if the user already exists
existingUser, _ := u.DB.FindOne(context.Background(), bson.M{"email": user.Email})
if existingUser != nil {
config.ErrorStatus("user already exists", http.StatusConflict, w, fmt.Errorf("duplicate email"))
config.ErrorStatus("email already exists", http.StatusConflict, w, fmt.Errorf("duplicate email"))
return
}

Expand Down

0 comments on commit a577a86

Please sign in to comment.