refactor: update assertGameNotOver to use proper syntax and improve readability
Build & Test (NowChessSystems) TeamCity build failed

This commit is contained in:
2026-04-20 21:57:22 +02:00
parent f52c53c51e
commit c9821ff29e
@@ -125,8 +125,10 @@ class GameResource:
private def ok(body: AnyRef): Response = Response.ok(body).build()
private def created(body: AnyRef): Response = Response.status(Response.Status.CREATED).entity(body).build()
// scalafix:off DisableSyntax.throw
private def assertGameNotOver(entry: GameEntry): Unit =
if entry.engine.context.result.isDefined then throw BadRequestException("GAME_OVER", "Game is already over")
// scalafix:on DisableSyntax.throw
// ── endpoints ────────────────────────────────────────────────────────────
// scalafix:off DisableSyntax.throw