Skip to content

Commit

Permalink
fix:see notification when not logged in
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmy0006 committed Aug 28, 2024
1 parent cd72e13 commit 324826b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public ResponseEntity<Void> registerPost(@AuthenticationPrincipal Member member,
@GetMapping("/post/{postId}")
public ResponseEntity<PostResponse> viewPost(@AuthenticationPrincipal Member member, @PathVariable Long postId) {
Post post = postService.findById(member, postId);
PostResponse response = PostResponse.of(post, scrapService.isScrap(member.getLoginID(),postId));
PostResponse response = PostResponse.of(post, (member==null)?scrapService.isScrap(member.getLoginID(),postId):false);
return ResponseEntity.status(HttpStatus.OK).body(response);
}

Expand Down

0 comments on commit 324826b

Please sign in to comment.