Skip to content

Commit

Permalink
fixed url usage in routes
Browse files Browse the repository at this point in the history
  • Loading branch information
joshika39 committed Apr 20, 2024
1 parent 2a21369 commit 4e4e944
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@

ENV = os.getenv("ENV", "development")
SELF_URL = os.getenv('SELF_URL')
FRONTEND_URL = os.getenv('FRONTEND_URL')

if not SELF_URL:
raise ValueError('SELF_URL not found in .env file')
if not SELF_URL or not FRONTEND_URL:
raise ValueError('SELF_URL or FRONTEND_URL not found in .env file')

if ENV == "development":
path_root = Path(__file__).parents[1]
Expand Down Expand Up @@ -195,7 +196,7 @@ def send_email(provider: str, send_model: SendModel):
user_config,
smp_config,
os.path.join('backend', 'email.html'),
SELF_URL,
FRONTEND_URL,
SignatureType.SIMPLE
)

Expand Down

0 comments on commit 4e4e944

Please sign in to comment.