This commit is contained in:
Claude Brisson
2023-11-18 08:31:24 +01:00
parent 5f068476dc
commit b2c56145c4
8 changed files with 184 additions and 106 deletions

View File

@@ -314,7 +314,7 @@ fun Pairing.toJson() = Json.Object(
"type" to type.name,
"base" to pairingParams.base.toJson(),
"main" to pairingParams.main.toJson(),
"secondary" to pairingParams.main.toJson(),
"secondary" to pairingParams.secondary.toJson(),
"geo" to pairingParams.geo.toJson(),
"handicap" to pairingParams.handicap.toJson(),
"placement" to placementParams.toJson()

View File

@@ -248,6 +248,7 @@ class ApiServlet : HttpServlet() {
response.status = code
if (response.isCommitted) return
val errorPayload = Json.Object(
"success" to false,
"error" to (message ?: "unknown error")
)
setContentType(response)