|
5 | 5 | import static io.f1.backend.domain.game.mapper.RoomMapper.toQuestionStartResponse; |
6 | 6 | import static io.f1.backend.domain.quiz.mapper.QuizMapper.toGameStartResponse; |
7 | 7 |
|
8 | | -import io.f1.backend.domain.game.dto.request.GameSettingChanger; |
9 | 8 | import io.f1.backend.domain.game.dto.MessageType; |
| 9 | +import io.f1.backend.domain.game.dto.request.GameSettingChanger; |
10 | 10 | import io.f1.backend.domain.game.event.RoomUpdatedEvent; |
11 | 11 | import io.f1.backend.domain.game.model.Player; |
12 | 12 | import io.f1.backend.domain.game.model.Room; |
@@ -98,8 +98,10 @@ public void changeGameSetting( |
98 | 98 |
|
99 | 99 | broadcastGameSetting(room); |
100 | 100 |
|
101 | | - RoomUpdatedEvent roomUpdatedEvent = new RoomUpdatedEvent(room, |
102 | | - quizService.getQuizWithQuestionsById(room.getGameSetting().getQuizId())); |
| 101 | + RoomUpdatedEvent roomUpdatedEvent = |
| 102 | + new RoomUpdatedEvent( |
| 103 | + room, |
| 104 | + quizService.getQuizWithQuestionsById(room.getGameSetting().getQuizId())); |
103 | 105 |
|
104 | 106 | eventPublisher.publishEvent(roomUpdatedEvent); |
105 | 107 | } |
@@ -157,8 +159,8 @@ private void broadcastGameSetting(Room room) { |
157 | 159 | String destination = getDestination(room.getId()); |
158 | 160 | Quiz quiz = quizService.getQuizWithQuestionsById(room.getGameSetting().getQuizId()); |
159 | 161 | messageSender.send( |
160 | | - destination, |
161 | | - MessageType.GAME_SETTING, |
162 | | - toGameSettingResponse(room.getGameSetting(), quiz)); |
| 162 | + destination, |
| 163 | + MessageType.GAME_SETTING, |
| 164 | + toGameSettingResponse(room.getGameSetting(), quiz)); |
163 | 165 | } |
164 | 166 | } |
0 commit comments