From 170f66ce2634f8127cefdb134154b79a3e76bffc Mon Sep 17 00:00:00 2001 From: Valentin CZERYBA Date: Fri, 13 Oct 2023 23:36:51 +0200 Subject: [PATCH] add limit and skip --- app/routers/users.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/routers/users.py b/app/routers/users.py index 9f5c13b..6c54c04 100644 --- a/app/routers/users.py +++ b/app/routers/users.py @@ -10,7 +10,7 @@ router = APIRouter() async def read_users(authorize: Annotated[bool, Depends(permissions_checker.PermissionChecker(roles=["Admin"]))]): listUsers = [] user_repository = users.UserRepository(database=database.database) - for fake in user_repository.find_by({}): + for fake in user_repository.find_by({}, limit=20, skip=0): print(fake) user = users.UserOut(id=fake.id, username=fake.username, disabled=fake.disabled, roles=fake.roles) listUsers.append(user)