fix: wrap server list response in ExternalTournamentServerList
Build & Test (NowChessSystems) TeamCity build finished
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:
+2
-2
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user