Skip to content

Commit

Permalink
fix: 동일성 체크 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
daeyoung0726 committed Aug 3, 2024
1 parent 3c294d6 commit 6e01716
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/gible/domain/post/service/PostService.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public PostDetailRes getPost(UUID postId, UUID userId) {
Post foundPost = postRepository.findById(postId).orElseThrow(() ->
new CustomException(ErrorType.POST_NOT_FOUND));

boolean isPermitted = userId == foundPost.getWriter().getId();
boolean isPermitted = userId.equals(foundPost.getWriter().getId());

List<Donation> donations = donationRepository.findByPost_Id(postId);
Map<String, Integer> donatorInfos = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public ReviewDetailRes getReview(UUID userId, UUID reviewId) {
Review foundReview = reviewRepository.findById(reviewId).orElseThrow(() ->
new CustomException(ErrorType.EVENT_NOT_FOUND));

boolean isPermitted = userId == foundReview.getWriter().getId();
boolean isPermitted = userId.equals(foundReview.getWriter().getId());
return ReviewDetailRes.fromEntity(foundReview, isPermitted);
}

Expand Down

0 comments on commit 6e01716

Please sign in to comment.