Skip to content

Commit

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


@router.get("/salts")
@limiter.limit("60/minute")
async def salt_list(request: Request):
query_result = repo.query(
"""
SELECT *
FROM match_salts
ORDER BY match_id DESC
LIMIT 10000
"""
)

return query_result.named_results()


@router.get("/active-matches")
@limiter.limit("100/minute")
async def active_matches(request: Request, skip: int = 0):
Expand Down

0 comments on commit 6e49aa5

Please sign in to comment.