Skip to content

Commit

Permalink
Fix making User model for check-auth response
Browse files Browse the repository at this point in the history
  • Loading branch information
jterry64 committed May 8, 2024
1 parent 71d6f46 commit e5c8e38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/authentication/token.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ async def get_user(token: str = Depends(oauth2_scheme)) -> User:
logger.info("Unauthorized user")
raise HTTPException(status_code=401, detail="Unauthorized")
else:
return User(**response.json()["data"])
return User(**response.json())


async def get_admin(user: User = Depends(get_user)) -> User:
Expand Down

0 comments on commit e5c8e38

Please sign in to comment.