chore: extract mail to it's own service
This commit is contained in:
@@ -400,7 +400,8 @@ func HandleDeleteAccountComp(db *sql.DB, serverSettings *types.ServerSettings) h
|
||||
return
|
||||
}
|
||||
|
||||
go mailService.SendMail(user.Email, "Account deleted", "Your account has been deleted")
|
||||
//TODO
|
||||
// go utils.SendMail(user.Email, "Account deleted", "Your account has been deleted")
|
||||
|
||||
utils.DoRedirect(w, r, "/")
|
||||
}
|
||||
@@ -579,7 +580,8 @@ func HandleResetPasswordComp(db *sql.DB, serverSettings *types.ServerSettings) h
|
||||
utils.TriggerToast(w, r, "error", "Internal Server Error")
|
||||
return
|
||||
}
|
||||
mailService.SendMail(email, "Reset Password", mail.String())
|
||||
//TODO
|
||||
// utils.SendMail(email, "Reset Password", mail.String())
|
||||
}
|
||||
|
||||
utils.TriggerToast(w, r, "info", "If the email exists, an email has been sent")
|
||||
@@ -615,8 +617,8 @@ func sendVerificationEmail(db *sql.DB, userId string, email string, serverSettin
|
||||
utils.LogError("Could not render welcome email", err)
|
||||
return
|
||||
}
|
||||
mailService := NewMailService(serverSettings)
|
||||
mailService.SendMail(email, "Welcome to ME-FIT", w.String())
|
||||
//TODO
|
||||
// utils.SendMail(email, "Welcome to ME-FIT", w.String())
|
||||
}
|
||||
|
||||
func TryCreateSessionAndSetCookie(r *http.Request, w http.ResponseWriter, db *sql.DB, user_uuid uuid.UUID) error {
|
||||
|
||||
Reference in New Issue
Block a user