Skip to content

Commit

Permalink
fix: RoomType 요청에러 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
yooooonshine committed Aug 7, 2024
1 parent 179e536 commit dc92ba1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ protected void doFilterInternal(HttpServletRequest request, HttpServletResponse
final String refreshToken = jwtTokenProvider.extractRefreshToken(request).orElse(null);
final String accessToken = jwtTokenProvider.extractAccessToken(request).orElse(null);
final String tokenRoomId = jwtTokenProvider.extractRoomId(accessToken).orElse(null);
final Room room = roomRepository.findByIdentityNumber(tokenRoomId)
.orElseThrow(() -> new CustomException(ROOM_NOT_FOUND));

final String nowRoomId = jwtTokenProvider.extractRoomId(request).orElse(null);
final RoomType nowRoomType = jwtTokenProvider.extractRoomType(request).orElse(null);
final Room room = roomRepository.findByIdentityNumber(nowRoomId)
.orElseThrow(() -> new CustomException(ROOM_NOT_FOUND));

//1. access토큰이 존재하며, accessToken이 유효하면 인증
//2. access토큰이 존재하며, accesToken이 유효하지 않으면 에러 리턴
Expand Down

0 comments on commit dc92ba1

Please sign in to comment.