Skip to content

Commit

Permalink
tweaked landing page
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasThinks committed Feb 7, 2025
1 parent 875c783 commit d83362f
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,17 +175,9 @@ def send_confirmation_email(recipient: str, token: str, recipient_first_name: st
# -----------------------

@app.get("/")
def get(req, sess):
# if the user is not logged in, show the static landing page
# if the user is logged in, redirect to dashboard
auth = req.scope["auth"] = sess.get("auth", None)
logger.debug(f"Root path accessed with auth: {auth}")
if not auth:
logger.debug("User not authenticated, redirecting to homepage")
return RedirectResponse("/homepage", status_code=303)
else:
logger.debug("User authenticated, redirecting to dashboard")
return RedirectResponse("/dashboard", status_code=303)
def get():
return generate_themed_page(landing_page)


@app.get("/homepage")
def get():
Expand Down

0 comments on commit d83362f

Please sign in to comment.