feat(security): #286 fix mail sending
This commit was merged in pull request #300.
This commit is contained in:
@@ -220,7 +220,7 @@ func (service AuthImpl) SignUp(email string, password string) (*User, error) {
|
||||
func (service AuthImpl) SendVerificationMail(userId uuid.UUID, email string) {
|
||||
|
||||
tokens, err := service.db.GetTokensByUserIdAndType(userId, db.TokenTypeEmailVerify)
|
||||
if err != nil {
|
||||
if err != nil && err != db.ErrNotFound {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -304,7 +304,7 @@ func (service AuthImpl) DeleteAccount(user *User) error {
|
||||
return err
|
||||
}
|
||||
|
||||
go service.mail.SendMail(user.Email, "Account deleted", "Your account has been deleted")
|
||||
service.mail.SendMail(user.Email, "Account deleted", "Your account has been deleted")
|
||||
|
||||
return nil
|
||||
}
|
||||
@@ -370,7 +370,7 @@ func (service AuthImpl) SendForgotPasswordMail(email string) error {
|
||||
log.Error("Could not render reset password email: %v", err)
|
||||
return types.ErrInternal
|
||||
}
|
||||
go service.mail.SendMail(email, "Reset Password", mail.String())
|
||||
service.mail.SendMail(email, "Reset Password", mail.String())
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user