Skip to content

Commit

Permalink
fix: user token cookies key (#130)
Browse files Browse the repository at this point in the history
  • Loading branch information
RaoHai authored Jun 3, 2024
2 parents d2d0d81 + b44f8c9 commit 9d3368b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/routers/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ async def callback(request: Request, response: Response):
async def userinfo(request: Request, response: Response, petercat_user_token: str = Cookie(None)):
if not petercat_user_token:
return await getAnonymousUser(request, response)
data = await getAnonymousUserInfoByToken(petercat_user_token) if petercat_user_token.startswith("client|") else await getUserInfoByToken(user_token)
data = await getAnonymousUserInfoByToken(petercat_user_token) if petercat_user_token.startswith("client|") else await getUserInfoByToken(petercat_user_token)
if data is None:
raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST, detail="Failed to get access token")
if data :
Expand Down

0 comments on commit 9d3368b

Please sign in to comment.