Skip to content

Commit

Permalink
Merge pull request #196 from DocShow-AI/dev
Browse files Browse the repository at this point in the history
potential fixes
  • Loading branch information
liberty-rising authored Jan 14, 2024
2 parents 3cbe6d5 + e7e9cf0 commit 65e5421
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions backend/routes/user_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
get_password_hash,
verify_password,
)
from settings import SENDGRID_API_KEY, APP_HOST, APP_ENV
from utils.email import (
send_password_reset_email_with_sendgrid,
send_verification_email_with_sendgrid,
Expand Down Expand Up @@ -163,9 +162,6 @@ async def reset_password(request: ResetPasswordRequest):
async def send_verification_email(
request: SendVerificationEmailRequest, background_tasks: BackgroundTasks
):
print(
"APP_ENV", APP_ENV, "APP_HOST", APP_HOST, "SENDGRID_API_KEY", SENDGRID_API_KEY
)
print("Getting user by email")
with DatabaseManager() as session:
user_manager = UserManager(session)
Expand All @@ -182,9 +178,10 @@ async def send_verification_email(

print("Sending verification email")
# Add a background task to send the email
background_tasks.add_task(
send_verification_email_with_sendgrid, user.email, token
)
# background_tasks.add_task(
# send_verification_email_with_sendgrid, user.email, token
# )
await send_verification_email_with_sendgrid([user.email], token)

return {"message": f"Verification email sent for {user.email}"}

Expand Down

0 comments on commit 65e5421

Please sign in to comment.