Skip to content

Commit

Permalink
+fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
logerzerox committed Jan 9, 2025
1 parent 33c3ea6 commit 796ae48
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions py/core/providers/auth/r2r_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,9 @@ async def send_verification_email(
)

await self.email_provider.send_verification_email(
email=user.email,
verification_code=verification_code,
template_data={"first_name": first_name}
to_email=user.email,
verification_code=verification_code,
dynamic_template_data={"first_name": first_name}
)

return verification_code, expiry
Expand Down Expand Up @@ -422,8 +422,8 @@ async def change_password(
)
try:
await self.email_provider.send_password_changed_email(
email=user.email,
template_data={"first_name": user.name.split(" ")[0] or 'User'}
to_email=user.email,
dynamic_template_data={"first_name": user.name.split(" ")[0] or 'User'}
)
except Exception as e:
logger.error(f"Failed to send password change notification: {str(e)}")
Expand All @@ -450,7 +450,9 @@ async def request_password_reset(self, email: str) -> dict[str, str]:
user.name.split(" ")[0] if user.name else email.split("@")[0]
)
await self.email_provider.send_password_reset_email(
email, reset_token, {"first_name": first_name}
to_email=email,
reset_token=reset_token,
dynamic_template_data={"first_name": first_name}
)

return {
Expand Down Expand Up @@ -493,8 +495,8 @@ async def confirm_password_reset(

try:
await self.email_provider.send_password_changed_email(
email=user.email,
template_data={"first_name": user.name.split(" ")[0] or 'User'}
to_email=user.email,
dynamic_template_data={"first_name": user.name.split(" ")[0] or 'User'}
)
except Exception as e:
logger.error(f"Failed to send password change notification: {str(e)}")
Expand Down

0 comments on commit 796ae48

Please sign in to comment.