aboutsummaryrefslogtreecommitdiffstats
path: root/backend/routes/discord.py
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2024-07-16 19:03:49 +0100
committerGravatar Chris Lovering <[email protected]>2024-07-16 19:07:36 +0100
commit1276d199e37328f22712af46c27db65ceedcb5d3 (patch)
tree1c70a1903f666374173e228aeaff259521525b79 /backend/routes/discord.py
parentSimplify the docker compose build config (diff)
Use redis for the discord member cache over mongo
Diffstat (limited to 'backend/routes/discord.py')
-rw-r--r--backend/routes/discord.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/backend/routes/discord.py b/backend/routes/discord.py
index 53b8af3..196d902 100644
--- a/backend/routes/discord.py
+++ b/backend/routes/discord.py
@@ -60,7 +60,7 @@ class MemberRoute(route.Route):
async def delete(self, request: Request) -> JSONResponse:
"""Force a resync of the cache for the given user."""
body = await request.json()
- member = await discord.get_member(request.state.db, body["user_id"], force_refresh=True)
+ member = await discord.get_member(body["user_id"], force_refresh=True)
if member:
return JSONResponse(member.dict())
@@ -75,7 +75,7 @@ class MemberRoute(route.Route):
async def get(self, request: Request) -> JSONResponse:
"""Get a user's roles on the configured server."""
body = await request.json()
- member = await discord.get_member(request.state.db, body["user_id"])
+ member = await discord.get_member(body["user_id"])
if not member:
return NOT_FOUND_EXCEPTION