not working: attempt to stream in websocket

added Vite proxy, tested with websocat, with direct js websocket.
the error seems to be Laminex related
This commit is contained in:
efim
2023-04-23 21:18:24 +04:00
parent 329dc6e8b2
commit 5ac864f15e
5 changed files with 91 additions and 17 deletions

View File

@@ -6,14 +6,10 @@ import io.circe._
object Models {
/** view of the single planning poker round
* @param players
* \- people who are currently playing
* @param allowedCards
* \- the cards values that can be used by players
* @param round
* \- state of the selected cards of the players
* @param canCloseRound
* \- whether current player has access to button to finish the round
* @param players - people who are currently playing
* @param allowedCards- the cards values that can be used by players
* @param round - state of the selected cards of the players
* @param canCloseRound - whether current player has access to button to finish the round
*/
final case class RoomStateView(
players: List[Player],
@@ -25,9 +21,15 @@ object Models {
def playersCount: Int = players.size
}
given Encoder[Map[PlayerID, String]] = Encoder.encodeMap[PlayerID, String]
given Decoder[Map[PlayerID, String]] = Decoder.decodeMap[PlayerID, String]
given Codec[Map[PlayerID, String]] = Codec.from(summon[Decoder[Map[PlayerID, String]]], summon[Encoder[Map[PlayerID, String]]])
object RoomStateView {
given Encoder[Map[PlayerID, String]] = Encoder.encodeMap[PlayerID, String]
given Decoder[Map[PlayerID, String]] = Decoder.decodeMap[PlayerID, String]
given Codec[Map[PlayerID, String]] = Codec.from(summon[Decoder[Map[PlayerID, String]]], summon[Encoder[Map[PlayerID, String]]])
val empty = RoomStateView(
List.empty, PlayerID(0), List.empty, RoundState.Voting(None, List.empty), false
)
}
enum RoundState derives Codec.AsObject: