Skip to content
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

[Feature] 책 리뷰 추가, 삭제 API 구현 #41

Merged
merged 5 commits into from
Mar 26, 2024

Conversation

pdohyung
Copy link
Member

💡 연관된 이슈

close #31

📝 작업 내용

  • 리뷰 추가 기능 추가
  • 리뷰 삭제 기능 추가

💬 리뷰 요구 사항

특별한 사항은 없습니다 !
리뷰 잘 부탁드립니다.

@pdohyung pdohyung added the ✨ Feature 기능 개발 label Mar 25, 2024
@pdohyung pdohyung self-assigned this Mar 25, 2024
@pdohyung pdohyung linked an issue Mar 25, 2024 that may be closed by this pull request
2 tasks
@pdohyung pdohyung requested a review from AHNYUNKI March 25, 2024 13:36
Copy link
Collaborator

@jwooo jwooo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다 👍

메소드 중복이 있는거 같아 리뷰 남겨 놓았습니다. 리뷰 한 번 확인 부탁드립니다!!

Comment on lines 59 to 62
public boolean isSame(Long userId) {
return this.id.equals(userId);
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isSame과 같은 기능을 하는 isMe 메서드가 위쪽에 하나 있어 둘 중에 하나만 사용하면 좋을 것 같습니다!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

정우님 말에 공감합니다. 똑같은 메서드가 두 번 반복되네요

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

그렇네요 ! 수정했습니다 ~ 😊

Comment on lines +35 to +37
Review savedReview = reviewRepository.save(Review.create(
user, book, request.getContent(), request.getRating()
));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

객체간 의존성을 줄이기 위해 request의 값을 꺼내어 String 값을 넘겨주는 건가요?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넵 맞습니다 ~ 의존성 문제도 있지만 create는 Review의 생성 함수입니다.
Review 도메인은 퍼시스턴스 계층이기 때문에 만약 request를 넘겨준다면 해당 계층이 비즈니스 계층의 내용을 알게 됩니다.
그래서 해당 코드와 같이 값을 뽑아서 전달했습니다 !

Copy link
Member

@AHNYUNKI AHNYUNKI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다 도형님!
리뷰 남겼으니, 확인 부탁드리고 머지 허용 했습니다!

Comment on lines 59 to 62
public boolean isSame(Long userId) {
return this.id.equals(userId);
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

정우님 말에 공감합니다. 똑같은 메서드가 두 번 반복되네요

Copy link
Collaborator

@jwooo jwooo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넵 확인했습니다. 머지 허용했습니다.

고생하셨습니다 👍

@pdohyung pdohyung merged commit 04cfd5a into develop Mar 26, 2024
1 check passed
@pdohyung pdohyung deleted the feature/31-book-review-api branch March 26, 2024 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Feature 기능 개발
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] 책 리뷰 API 구현
3 participants