Dev actions controller/router + user registration

This commit is contained in:
2026-09-02 00:40:09 +03:00
parent a6bbef1bf3
commit f2ec6889cb
6 changed files with 124 additions and 8 deletions
+9
View File
@@ -5,6 +5,14 @@ import play.api.libs.json.{JsValue, Json, Writes}
import java.time.Instant
case class User(id: Option[Int], username: String, gid: String, passwordDigest: Option[String])
object User {
given writes: Writes[User] = new Writes[User] {
override def writes(o: User): JsValue = Json.obj(
"gid" -> o.gid,
"username" -> o.username
)
}
}
case class AuthToken(id: Option[Int], userId: Int, token: String, createdAt: Instant, expiresAt: Instant)
@@ -28,6 +36,7 @@ object Auction {
"id" -> a.id,
"name" -> a.name,
"gid" -> a.gid,
"status" -> a.status.toString,
"starting_price" -> a.startingPrice,
"current_bid" -> a.currentBid,
"current_bidder_id" -> a.currentBidderId,