From ee9ce53f82bd89fd9fcb4770a241b037bf5eb112 Mon Sep 17 00:00:00 2001 From: Claude Brisson Date: Thu, 22 Aug 2024 18:28:49 +0200 Subject: [PATCH] Standings handler default round is the last --- .../main/kotlin/org/jeudego/pairgoth/api/StandingsHandler.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-webapp/src/main/kotlin/org/jeudego/pairgoth/api/StandingsHandler.kt b/api-webapp/src/main/kotlin/org/jeudego/pairgoth/api/StandingsHandler.kt index 55dfe39..d5b4fb3 100644 --- a/api-webapp/src/main/kotlin/org/jeudego/pairgoth/api/StandingsHandler.kt +++ b/api-webapp/src/main/kotlin/org/jeudego/pairgoth/api/StandingsHandler.kt @@ -27,7 +27,7 @@ import kotlin.collections.ArrayList object StandingsHandler: PairgothApiHandler { override fun get(request: HttpServletRequest, response: HttpServletResponse): Json? { val tournament = getTournament(request) - val round = getSubSelector(request)?.toIntOrNull() ?: ApiHandler.badRequest("invalid round number") + val round = getSubSelector(request)?.toIntOrNull() ?: tournament.rounds val includePreliminary = request.getParameter("include_preliminary")?.let { it.toBoolean() } ?: false val sortedPairables = tournament.getSortedPairables(round, includePreliminary)