aboutsummaryrefslogtreecommitdiffstats
path: root/backend/routes/auth/authorize.py
diff options
context:
space:
mode:
authorGravatar ks129 <[email protected]>2020-12-02 12:09:12 +0200
committerGravatar ks129 <[email protected]>2020-12-02 12:09:12 +0200
commit5ddbcaa41a4952720feb22733d57a2c7507aa95a (patch)
treea15e23ba0f7d17e8a00f81ca5a43b18b28cba295 /backend/routes/auth/authorize.py
parentMerge pull request #11 from python-discord/ks123/models (diff)
Move from PyMongo to Motor driver for asynchronous support
Diffstat (limited to 'backend/routes/auth/authorize.py')
-rw-r--r--backend/routes/auth/authorize.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/backend/routes/auth/authorize.py b/backend/routes/auth/authorize.py
index 5de49f5..41c0a0b 100644
--- a/backend/routes/auth/authorize.py
+++ b/backend/routes/auth/authorize.py
@@ -25,7 +25,7 @@ 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(
+ user_details["admin"] = await request.state.db.admins.find_one(
{"_id": user_details["id"]}
) is not None