diff --git a/src/main/java/KGUcapstone/OutDecision/domain/post/service/PostServiceImpl.java b/src/main/java/KGUcapstone/OutDecision/domain/post/service/PostServiceImpl.java index e846f48..c27d7e2 100644 --- a/src/main/java/KGUcapstone/OutDecision/domain/post/service/PostServiceImpl.java +++ b/src/main/java/KGUcapstone/OutDecision/domain/post/service/PostServiceImpl.java @@ -114,7 +114,7 @@ public PostDTO viewPost(Long postId) { Long memberId; // 로그인 체크 if(memberOptional.isPresent()) memberId = memberOptional.get().getId(); - else throw new MemberHandler(ErrorStatus.MEMBER_NOT_FOUND); + else memberId = 0L; Post post = postRepository.findById(postId) .orElseThrow(() -> new PostHandler(ErrorStatus.POST_NOT_FOUND));