-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hotfix: 좋아요/싫어요 취소 시, 싫어요 취소해도 좋아요 통계 줄어드는 오류 수정 #473
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
리뷰할 때 이걸 놓쳤었네요..
잘 바꿔주신 것 같아서 바로 Approve 하겠습니다 -
final Optional<PlaceLike> findPlaceLike = placeLikeRepository.findById(placeLike.getId()); | ||
final PlaceStatistics findPlaceStatistics = placeStatisticsRepository.findByPlaceId(place.getId()).get(); | ||
assertSoftly(softAssertions -> { | ||
assertThat(findPlaceStatistics.getLikeCount()).isEqualTo(beforeLikeCount); | ||
assertThat(findPlaceLike).isEmpty(); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
검증 굿
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
빠른 수정해주셨네요 루카! 예외 테스트까지 굳입니다!
private void subtractPlaceLikeCount(final Long placeId, final PlaceLike placeLike) { | ||
if(placeLike.getType() == PlaceLikeType.LIKE) { | ||
final SubtractLikeCommand subtractLikeCommand = new SubtractLikeCommand(placeId); | ||
placeStatisticsService.subtractLike(subtractLikeCommand); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저희 enum앞에 클래스명을 붙이지 않는것이 컨밴션이였던것으로 기억합니다!
📌 관련 이슈
🛠️ 작업 내용
PR에서 작업한 주요 내용을 적어주세요.
🎯 리뷰 포인트
hotfix입니다.
지난번 좋아요/싫어요 삭제 PR에 대한 수정입니다.
좋아요를 삭제할 때만 좋아요 개수를 한개 줄여야되는데,
싫어요를 삭제할 때도 좋아요 개수를 한개 줄이는 오류 수정입니다.
⏳ 작업 시간
추정 시간: 30분
실제 시간: 15분