Gregniuki commited on
Commit
30c22df
1 Parent(s): 3efb9ac

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -1
main.py CHANGED
@@ -139,4 +139,4 @@ async def protected_route(request: Request, token: str = Depends(oauth2_scheme),
139
  raise HTTPException(status_code=401, detail="User not found in the database")
140
 
141
  # The user exists in the database, and you can render the protected route template
142
- return templates.TemplateResponse("protected.html", {"request": request, "user": db_user.username})
 
139
  raise HTTPException(status_code=401, detail="User not found in the database")
140
 
141
  # The user exists in the database, and you can render the protected route template
142
+ return templates.TemplateResponse("protected.html", {"request": request, "user": user.email})