refactor: clean up code formatting and improve readability across multiple files

This commit is contained in:
2026-04-29 08:38:27 +02:00
parent 5d97c3c8b5
commit 106118ad29
43 changed files with 414 additions and 379 deletions
@@ -15,4 +15,3 @@ class JacksonConfig extends ObjectMapperCustomizer:
new Version(2, 21, 1, null, "com.fasterxml.jackson.module", "jackson-module-scala")
// scalafix:on DisableSyntax.null
})
@@ -11,4 +11,3 @@ import io.quarkus.runtime.annotations.RegisterForReflection
),
)
class NativeReflectionConfig
@@ -36,9 +36,9 @@ class GameRecordRepository:
def findByPlayerIdRunning(playerId: String, offset: Int, limit: Int): List[GameRecord] =
em.createQuery(
"SELECT g FROM GameRecord g WHERE g.whiteId = :id OR g.blackId = :id AND g.result = null ORDER BY g.updatedAt DESC",
classOf[GameRecord],
).setParameter("id", playerId)
"SELECT g FROM GameRecord g WHERE g.whiteId = :id OR g.blackId = :id AND g.result = null ORDER BY g.updatedAt DESC",
classOf[GameRecord],
).setParameter("id", playerId)
.setFirstResult(offset)
.setMaxResults(limit)
.getResultList
@@ -28,10 +28,10 @@ class StoreGameResource:
@Path("/running/{playerId}")
@Produces(Array(MediaType.APPLICATION_JSON))
def getRunning(
@PathParam("playerId") playerId: String,
@QueryParam("offset") @DefaultValue("0") offset: Int,
@QueryParam("limit") @DefaultValue("20") limit: Int,
): Response =
@PathParam("playerId") playerId: String,
@QueryParam("offset") @DefaultValue("0") offset: Int,
@QueryParam("limit") @DefaultValue("20") limit: Int,
): Response =
Response.ok(repository.findByPlayerIdRunning(playerId, offset, limit)).build()
@GET