aboutsummaryrefslogtreecommitdiffstats
path: root/backend/routes/discord.py
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2024-07-17 12:10:25 +0100
committerGravatar Chris Lovering <[email protected]>2024-07-17 22:16:19 +0100
commit46af39a2a3286401f87a92b3f488bd8b67184c05 (patch)
tree9fda172c7f8f30795866659d29e14ba74465b31e /backend/routes/discord.py
parentSimplify the logic for fetching from member cache (diff)
Use redis to store the role cache
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 196d902..5cd6b47 100644
--- a/backend/routes/discord.py
+++ b/backend/routes/discord.py
@@ -31,9 +31,9 @@ class RolesRoute(route.Route):
resp=Response(HTTP_200=RolesResponse),
tags=["roles"],
)
- async def patch(self, request: Request) -> JSONResponse:
+ async def patch(self, request: Request) -> JSONResponse: # noqa: ARG002 Request is required by @requires
"""Refresh the roles database."""
- roles = await discord.get_roles(request.state.db, force_refresh=True)
+ roles = await discord.get_roles(force_refresh=True)
return JSONResponse(
{"roles": [role.dict() for role in roles]},