mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
refactor: use await for db requests
This commit is contained in:
parent
05bc83d6c6
commit
d76a4a4138
16 changed files with 118 additions and 121 deletions
|
|
@ -42,7 +42,7 @@ async def verify_user_rights_with_roles(request: Request,action: str, user_id: s
|
|||
|
||||
# Info: permission actions are: read, create, delete, update
|
||||
|
||||
for role in user_roles_cursor:
|
||||
for role in await user_roles_cursor.to_list(length=100):
|
||||
user_roles.append(role)
|
||||
|
||||
for role in user_roles:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue