diff options
| -rw-r--r-- | backend/routes/auth/authorize.py | 4 | 
1 files changed, 4 insertions, 0 deletions
| diff --git a/backend/routes/auth/authorize.py b/backend/routes/auth/authorize.py index 0a90856..768b9af 100644 --- a/backend/routes/auth/authorize.py +++ b/backend/routes/auth/authorize.py @@ -24,6 +24,10 @@ class AuthorizeRoute(Route):          bearer_token = await fetch_bearer_token(data["token"])          user_details = await fetch_user_details(bearer_token["access_token"]) +        user_details["admin"] = request.state.db.admins.find_one( +            {"_id": user_details["id"]} +        ) is not None +          token = jwt.encode(user_details, SECRET_KEY, algorithm="HS256")          return JSONResponse({ | 
