bugfix: need to recognize owner after relogin
playerid is not stable right now, need to use nickname
This commit is contained in:
@@ -82,6 +82,6 @@ object Auth {
|
||||
|
||||
def make[F[_]: Sync](): F[Auth[F]] =
|
||||
for {
|
||||
sessionsMap <- Ref.of[F, SessionsMap](TestModels.testSessions)
|
||||
sessionsMap <- Ref.of[F, SessionsMap](Map.empty)
|
||||
} yield new SimpleAuth(sessionsMap)
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ class InMemoryRoomService[F[_]: Concurrent](stateRef: Ref[F, Map[RoomID, (Room,
|
||||
val newRoom = Room(
|
||||
roomId,
|
||||
players = List(ownerPlayer),
|
||||
owner = ownerPlayer.id,
|
||||
owner = ownerPlayer.name,
|
||||
password = roomPassword,
|
||||
allowedCards = List("XS", "S", "M", "L", "XL"), // TODO accept from front
|
||||
round = RoundState.Voting(Map.empty),
|
||||
|
||||
Reference in New Issue
Block a user