Small refactoring of the sessions controller

This commit is contained in:
2026-09-13 00:37:27 +03:00
parent 2754c86c63
commit 8c0deee2df
2 changed files with 22 additions and 14 deletions
+8
View File
@@ -15,6 +15,14 @@ object User {
}
case class AuthToken(id: Option[Int], userId: Int, token: String, createdAt: Instant, expiresAt: Instant)
object AuthToken {
given writes: OWrites[AuthToken] = (a: AuthToken) => Json.obj(
"token" -> a.token,
"userId" -> a.userId,
"createdAt" -> a.createdAt,
"expiresAt" -> a.expiresAt
)
}
enum AuctionStatus(val value: Short) {
case Created extends AuctionStatus(0)