Skip to content

Commit ed63fbc

Browse files
authored
Merge pull request #459 from Seluj78/271-email-templates
2 parents fa255b3 + 73cb6e6 commit ed63fbc

File tree

6 files changed

+662
-240
lines changed

6 files changed

+662
-240
lines changed

backend/PyMatcha/routes/api/auth/email.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,6 @@ def request_new_email_conf():
8787
token = generate_confirmation_token(email=email, token_type="confirm")
8888
link = FRONTEND_EMAIL_CONFIRMATION_URL + token
8989
rendered_html = render_template("confirm_email.html", link=link)
90-
send_mail_html.delay(dest=data["email"], subject="Confirm your email on PyMatcha", html=rendered_html)
90+
send_mail_html.delay(dest=data["email"], subject="Confirm your email on Matcha", html=rendered_html)
9191
logging.debug("/auth/confirm/new -> New confirmation email sent if user exists in database")
9292
return Success("New confirmation email sent if user exists in database and isn't already confirmed.")

backend/PyMatcha/routes/api/auth/password.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def forgot_password():
5454
link = FRONTEND_PASSWORD_RESET_URL + token
5555
rendered_html = render_template("password_reset.html", link=link)
5656
logging.debug("Sending worker request to send email")
57-
send_mail_html.delay(dest=data["email"], subject="Reset your password on PyMatcha", html=rendered_html)
57+
send_mail_html.delay(dest=data["email"], subject="Reset your password on Matcha", html=rendered_html)
5858
logging.debug("Password reset mail sent successfully for user.")
5959
return Success("Password reset mail sent successfully if user exists in DB.")
6060

backend/PyMatcha/routes/api/auth/register.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,6 @@ def api_create_user():
5555
token = generate_confirmation_token(email=data["email"], token_type="confirm")
5656
link = FRONTEND_EMAIL_CONFIRMATION_URL + token
5757
rendered_html = render_template("confirm_email.html", link=link)
58-
send_mail_html.delay(dest=data["email"], subject="Confirm your email on PyMatcha", html=rendered_html)
58+
send_mail_html.delay(dest=data["email"], subject="Confirm your email on Matcha", html=rendered_html)
5959
logging.info("Registered new user successfully.")
6060
return SuccessOutputMessage("email", new_user.email, "New user successfully created.")

backend/PyMatcha/routes/api/profile/edit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def edit_email():
194194
token = generate_confirmation_token(email=new_email, token_type="confirm")
195195
link = FRONTEND_EMAIL_CONFIRMATION_URL + token
196196
rendered_html = render_template("confirm_email.html", link=link)
197-
send_mail_html.delay(dest=new_email, subject="Confirm your email on PyMatcha", html=rendered_html)
197+
send_mail_html.delay(dest=new_email, subject="Confirm your email on Matcha", html=rendered_html)
198198
logging.info(f"Edited email for {current_user.id}")
199199
return Success("Email sent for new email.")
200200

0 commit comments

Comments
 (0)