Skip to content

Commit

Permalink
Fix compiler error
Browse files Browse the repository at this point in the history
  • Loading branch information
ricksu978 committed Feb 18, 2024
1 parent 7e4262d commit b625d28
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class StartGameUseCase(
throw PlatformException(GAME_START_FAILED, "Room Id is null")
}
val gameServerHost = game.backEndUrl
val startGameRequest = StartGameRequest(roomId.toString(), players.map { it.toGamePlayer() })
val startGameRequest = StartGameRequest(roomId!!.value, players.map { it.toGamePlayer() })
val startGameResponse = gameService.startGame(gameServerHost, jwtToken, startGameRequest)

return StartedGameEvent(GAME_STARTED, Data(startGameResponse.url, roomId!!))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ class RoomControllerTest @Autowired constructor(
mockMvc.perform(
post("/rooms/${room.roomId!!.value}:startGame")
.withJwt(toJwt())
.withJson(StartGameRequest(room.players.map { it.toGamePlayer() }))
.withJson(StartGameRequest(room.roomId!!.value,room.players.map { it.toGamePlayer() }))
)

private fun Player.toGamePlayer(): StartGameRequest.GamePlayer =
Expand Down

0 comments on commit b625d28

Please sign in to comment.