Skip to content

Commit

Permalink
Merge pull request #11 from WATonomous/jimmy/misc-improvements
Browse files Browse the repository at this point in the history
misc improvements for user config lookup
  • Loading branch information
Jimmyj30 authored Jan 4, 2024
2 parents 0d87a91 + c46f430 commit 8c516b1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions app/email.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,12 @@ def generate_email_content(edit_link: str, user_config: dict):
name: str = user_config.get("general", {}).get("name")
if name is None:
name = "WATcloud user"
first_name:str = name.split(" ")[0]

email_body = (
f"<html>"
f"<head></head>"
f"<body><p>"
f"Hello {first_name},<br><br>"
f"Hello {name},<br><br>"
f"Greetings from WATcloud! Your WATcloud user config edit link is ready for you:<br>"
f"<a href=\"{edit_link}\">Edit Link</a><br><br>"
f"If you have any questions or need assistance, don't hesitate to reach out"
Expand Down
2 changes: 1 addition & 1 deletion app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ async def send_edit_link(email: Email, background_tasks: BackgroundTasks):
"We received your email address and will be sending you an edit"
" link shortly!"
)
email_address = email.email_address
email_address = email.email_address.lower()
if email_address not in email_to_user:
logger.info(f"email {email_address} not found in directory")
return return_msg
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
uvicorn>=0.23.2
fastapi>=0.104.0
PyYAML>=6.0.1
aiosmtplib>=2.0.2
aiosmtplib>=3.0.1
python-dotenv>=1.0.0

0 comments on commit 8c516b1

Please sign in to comment.