-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
51e2854
to
760f3c7
Compare
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.
고생하셨습니다 👍
메소드 중복이 있는거 같아 리뷰 남겨 놓았습니다. 리뷰 한 번 확인 부탁드립니다!!
public boolean isSame(Long userId) { | ||
return this.id.equals(userId); | ||
} | ||
|
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.
isSame
과 같은 기능을 하는 isMe
메서드가 위쪽에 하나 있어 둘 중에 하나만 사용하면 좋을 것 같습니다!
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.
그렇네요 ! 수정했습니다 ~ 😊
Review savedReview = reviewRepository.save(Review.create( | ||
user, book, request.getContent(), request.getRating() | ||
)); |
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.
객체간 의존성을 줄이기 위해 request
의 값을 꺼내어 String
값을 넘겨주는 건가요?
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.
넵 맞습니다 ~ 의존성 문제도 있지만 create는 Review의 생성 함수입니다.
Review 도메인은 퍼시스턴스 계층이기 때문에 만약 request를 넘겨준다면 해당 계층이 비즈니스 계층의 내용을 알게 됩니다.
그래서 해당 코드와 같이 값을 뽑아서 전달했습니다 !
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.
고생하셨습니다 도형님!
리뷰 남겼으니, 확인 부탁드리고 머지 허용 했습니다!
public boolean isSame(Long userId) { | ||
return this.id.equals(userId); | ||
} | ||
|
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.
넵 확인했습니다. 머지 허용했습니다.
고생하셨습니다 👍
💡 연관된 이슈
close #31
📝 작업 내용
💬 리뷰 요구 사항
특별한 사항은 없습니다 !
리뷰 잘 부탁드립니다.