Skip to content

Commit

Permalink
Merge pull request #81 from uju-in/LIME-156-review-like-fix
Browse files Browse the repository at this point in the history
[LIME-156] 로그인 하지 않아도 리뷰 좋아요 할 수 있는 버그 수정
  • Loading branch information
Curry4182 authored Apr 2, 2024
2 parents 0ce53a7 + a42b032 commit 4e8e643
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 4e8e643

Please sign in to comment.