Skip to content

Commit

Permalink
hotfix : SSE 접속시 code name parsing 로직 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
waterricecake committed Oct 12, 2024
1 parent ab0be3d commit 37c394f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/mafia/mafiatogether/game/aspect/SseService.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import mafia.mafiatogether.common.annotation.PlayerInfo;
import mafia.mafiatogether.common.exception.AuthException;
import mafia.mafiatogether.common.exception.ExceptionCode;
import mafia.mafiatogether.common.resolver.PlayerInfoDto;
import mafia.mafiatogether.game.application.dto.response.GameStatusResponse;
import mafia.mafiatogether.game.domain.Game;
import mafia.mafiatogether.game.domain.GameRepository;
Expand Down Expand Up @@ -45,8 +46,9 @@ public ResponseEntity<SseEmitter> subscribe(final ProceedingJoinPoint joinPoint)
String[] codeAndName = new String[2];
for (int i = 0; i < parameterAnnotations.length; i++) {
if (hasPlayerInfo(parameterAnnotations[i])) {
codeAndName[0] = args[i].toString();
codeAndName[1] = args[i].toString();
PlayerInfoDto playerInfoDto = (PlayerInfoDto) args[i];
codeAndName[0] = playerInfoDto.code();
codeAndName[1] = playerInfoDto.name();
break;
}
}
Expand Down

0 comments on commit 37c394f

Please sign in to comment.