Skip to content

Commit

Permalink
Merge pull request #26 from davidh16/debug
Browse files Browse the repository at this point in the history
pull
  • Loading branch information
davidh16 authored Aug 29, 2024
2 parents 9221ef6 + 83982e5 commit 0f41507
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions controller/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,7 @@ func (c Controller) RegisterUser(ctx *gin.Context) {

err = c.sendVerificationEmail(ctx, user)
if err != nil {
c.SendResponse(ctx, Response{
Status: http.StatusInternalServerError,
Error: err.Error(),
})
return
log.Println("failed to send an email : ", err.Error())
}

c.SendResponse(ctx, Response{
Expand Down Expand Up @@ -596,8 +592,7 @@ func (c Controller) sendVerificationEmail(ctx *gin.Context, user *models.User) e

err = c.service.SendVerificationLinkEmail(user.EmailAddress, verificationToken.Token)
if err != nil {
log.Println("failed to send an email")
return nil
return err
}

return nil
Expand Down

0 comments on commit 0f41507

Please sign in to comment.