Upgrade aioredis to 2.0

This commit is contained in:
long2ice
2021-08-05 10:47:04 +08:00
parent c95eef7dd4
commit 4f0e205c5d
4 changed files with 70 additions and 134 deletions

View File

@@ -104,7 +104,7 @@ class UsernamePasswordProvider(Provider):
path=request.app.admin_path,
httponly=True,
)
await redis.set(constants.LOGIN_USER.format(token=token), admin.pk, expire=expire)
await redis.set(constants.LOGIN_USER.format(token=token), admin.pk, ex=expire)
return response
async def logout(self, request: Request):