fix skip #60

Merged
v4l3n71n merged 1 commits from feature/pagination into master 2025-03-16 19:52:04 +00:00
Showing only changes of commit e07a74384f - Show all commits

View File

@ -84,8 +84,7 @@ async def read_events(
status_code=status.HTTP_400_BAD_REQUEST,
detail="`skip` should be >= 0 and `limit` should be > 0 and greater than `skip`.",
)
limit = limit + skip
skip = limit * skip
# Initialize filters
filters = []
@ -166,7 +165,7 @@ async def search_events(
status_code=status.HTTP_400_BAD_REQUEST,
detail="`skip` should be >= 0 and `limit` should be > 0 and greater than `skip`.",
)
limit = limit + skip
skip = limit * skip
# Initialize filters
filters = [{"status": {"$eq": status}}]