Gregniuki commited on
Commit
7423bd3
·
1 Parent(s): 7dbee2c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -404,8 +404,10 @@ async def get_protected(
404
  db: Session = Depends(get_db),
405
  token: Optional[str] = None # token is Optional because it may come from the cookie
406
  ):
 
407
  # Try to get the token from the query parameter first, then fall back to the cookie
408
  access_token = token or request.cookies.get("access_token")
 
409
  if not access_token:
410
  raise HTTPException(status_code=status.HTTP_401_UNAUTHORIZED, detail="Not authenticated xxx")
411
 
 
404
  db: Session = Depends(get_db),
405
  token: Optional[str] = None # token is Optional because it may come from the cookie
406
  ):
407
+ print(token)
408
  # Try to get the token from the query parameter first, then fall back to the cookie
409
  access_token = token or request.cookies.get("access_token")
410
+ print(access_token)
411
  if not access_token:
412
  raise HTTPException(status_code=status.HTTP_401_UNAUTHORIZED, detail="Not authenticated xxx")
413