refactor: clean up code formatting and improve readability across multiple files
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
+3
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user