-
Notifications
You must be signed in to change notification settings - Fork 1
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
[REFACTOR] 컨텐츠 상세 조회와 최신 컨텐츠 포인트 차감 로직 분리 #452
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.
메서드 명이나 스웨거 같은 부분에 대한 코멘트 확인해서 필요한 부분 수정 후에 머지하시면 될 것 같습니다
코멘트 전부 반영 안하셔도 괜찮을 것 같습니다
} | ||
|
||
// contentId로 content 조회 | ||
@Override |
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 findContent 를 public findContent로 해서 find 와 findContent를 하나로 합쳐서 쓰는게 낫지 않을까요?
아니면 find의 메서드 명은 살짝이라도 바뀌어야 할 것 같아요
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 findContent를 만든 이유는 중복 코드를 제거하기 위해서 입니다.
저 같은 경우는 DataProvider에서 단순히 Content를 가져오는 경우에는 find만 작성하기는 합니다만....
User 서버 기준에서는 검증을 거치기 위한 Content를 가져오는 것이니, 그에 맞게 변경하면 좋을 것 같군요.
public boolean verifyContentView(ContentCommand.GetDetail command) { | ||
contentReader.findContentIsActivated(command.contentId()); | ||
// 포인트 지불이 필요한 최신 컨텐츠인지 검증 | ||
public boolean verifyPaymentForRecentContent(Long contentId, Long 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.
여기 예외들 pointPublicController 의 스웨거에 반영해주시면 좋을 것 같아요
@tigris24 |
- ContentReader find 네이밍 변경 - 스웨거 예외응답 예시 추가
PR 타입 (하나 이상의 PR 타입을 선택해주세요)
변경 사항
참고 사항
셀프 체크리스트