Skip to content

Commit

Permalink
Use non bounded call, if possible
Browse files Browse the repository at this point in the history
  • Loading branch information
Fesaa committed Jul 22, 2024
1 parent f9b1782 commit 195a847
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,11 @@ public CompletableFuture<LeaderboardRow[]> getGameLeaderboard(
return CompletableFuture.failedFuture(
new WeaveException("Upper bound must be higher than the lower bound"));
}

if (low == 1 && up == 200) {
return getGameLeaderboard(game);
}

String url = String.format("%s/game/%s/bounded?lower=%d&upper=%d",
baseURL,
game.displayName().replace(" ", "%20"), low, up);
Expand Down

0 comments on commit 195a847

Please sign in to comment.