Skip to content

Commit

Permalink
Add an offset to /v1/salts
Browse files Browse the repository at this point in the history
  • Loading branch information
ankbhatia19 committed Oct 27, 2024
1 parent 6e49aa5 commit 88e0605
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions api/devlock_api/routes/v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,17 @@ async def match_meta(request: Request, match_id: str):


@router.get("/salts")
@limiter.limit("60/minute")
async def salt_list(request: Request):
@limiter.limit("100/minute")
async def salt_list(request: Request, skip: int = 0):
query_result = repo.query(
"""
SELECT *
FROM match_salts
ORDER BY match_id DESC
LIMIT 10000
"""
LIMIT 1000
OFFSET %(offset)s
""",
{"offset": skip}
)

return query_result.named_results()
Expand Down

0 comments on commit 88e0605

Please sign in to comment.