Skip to content

Commit

Permalink
Merge pull request #128 from TripComeTrue/feature/#9-set-up-tripRecor…
Browse files Browse the repository at this point in the history
…d-comment

[fix] 로그인하지 않은 사용자도 여행 후기 댓글(TripRecordComment) 목록 조회 가능하도록 수정
  • Loading branch information
meena2003 authored Jan 26, 2024
2 parents 3bd6920 + 953c5be commit 3b3a3f1
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,11 @@ public void saveComment(
}

private Member getMember(PrincipalDetails principalDetails) {
return memberRepository.findById(principalDetails.getMember().getId())
.orElseThrow(UserNotFoundException::new);
if (principalDetails != null) {
return memberRepository.findById(principalDetails.getMember().getId())
.orElseThrow(UserNotFoundException::new);
}
return null;
}

public void saveReplyComment(
Expand Down

0 comments on commit 3b3a3f1

Please sign in to comment.