Skip to content

Commit

Permalink
fix: 로그인 하지 않아도 리뷰 좋아요 할 수 있는 버그 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Curry4182 committed Apr 2, 2024
1 parent f0ce473 commit a42b032
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ public boolean alreadyLiked(
final Long memberId,
final Long reviewId
) {
if (memberId == null) {
return false;
}

return reviewLikeRepository.existsByMemberIdAndReviewId(memberId, reviewId);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ public void validateReviewLike(
final Long memberId,
final Long reviewId
) {
if (memberId == null) {
throw new BusinessException(ErrorCode.MEMBER_ANONYMOUS);
}

if (reviewLikeReader.alreadyLiked(memberId, reviewId)) {
throw new BusinessException(ErrorCode.ALREADY_REVIEW_LIKED);
}
Expand Down

0 comments on commit a42b032

Please sign in to comment.