Skip to content

Commit 324826b

Browse files
committed
fix:see notification when not logged in
1 parent cd72e13 commit 324826b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/poolc/api/post/controller/PostController.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public ResponseEntity<Void> registerPost(@AuthenticationPrincipal Member member,
4040
@GetMapping("/post/{postId}")
4141
public ResponseEntity<PostResponse> viewPost(@AuthenticationPrincipal Member member, @PathVariable Long postId) {
4242
Post post = postService.findById(member, postId);
43-
PostResponse response = PostResponse.of(post, scrapService.isScrap(member.getLoginID(),postId));
43+
PostResponse response = PostResponse.of(post, (member==null)?scrapService.isScrap(member.getLoginID(),postId):false);
4444
return ResponseEntity.status(HttpStatus.OK).body(response);
4545
}
4646

0 commit comments

Comments
 (0)