new auth method for joining room
This commit is contained in:
@@ -2,6 +2,7 @@ package industries.sunshine.planningpoker.common
|
||||
|
||||
import java.util.UUID
|
||||
import io.circe._
|
||||
import scala.util.Random
|
||||
|
||||
object Models {
|
||||
|
||||
@@ -53,6 +54,9 @@ object Models {
|
||||
final case class PlayerID(id: Long) derives Codec.AsObject
|
||||
|
||||
final case class Player(name: String, id: PlayerID) derives Codec.AsObject
|
||||
object Player {
|
||||
def create(name: String) = Player(name, PlayerID(Random.nextLong))
|
||||
}
|
||||
|
||||
final case class RoomID(name: String) derives Codec.AsObject
|
||||
|
||||
|
||||
Reference in New Issue
Block a user