fix: wrap server list response in ExternalTournamentServerList
Build & Test (NowChessSystems) TeamCity build finished

Frontend expects `{ servers: [...] }` but endpoint returned a plain array.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Janis Eccarius
2026-06-21 11:15:39 +02:00
parent fba324a5b0
commit f2d79e4952
@@ -1,6 +1,6 @@
package de.nowchess.tournament.resource
import de.nowchess.tournament.dto.{ErrorDto, RegisterServerRequest}
import de.nowchess.tournament.dto.{ErrorDto, ExternalTournamentServerList, RegisterServerRequest}
import de.nowchess.tournament.service.TournamentServerRegistry
import jakarta.annotation.security.RolesAllowed
import jakarta.enterprise.context.ApplicationScoped
@@ -22,7 +22,7 @@ class TournamentServerResource:
@GET
def list(): Response =
Response.ok(registry.list()).build()
Response.ok(ExternalTournamentServerList(registry.list())).build()
@POST
def register(req: RegisterServerRequest): Response =