-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add getting study details api #64
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.
LGTM! 고생 하셨습니다~ 👍
fun getDetails(studyId: Long): StudyDetailsResponse { | ||
val study = studyService.findById(studyId) | ||
val moit = moitService.findById(study.moitId) | ||
val firstAttendanceUserNickname = study.firstAttendanceUserId?.let(userService::findByIdOrNull)?.nickname |
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.
여기서는 user 가 반드시 있어야 하는 상황같은데, userService::findById 를 사용해도 괜찮지 않을까요?
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.
firstattendanceUser 는 nullable 한거 아닌가요?
fun of( | ||
moit: Moit, | ||
study: Study, | ||
firstAttendanceUserNickname: 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.
nickname 말고 첫 출석자의 다른 정보가 추후 DTO 에 추가될 때를 생각해보면, 인자로 firstAttendanceUser
만 User?
타입으로 받고 DTO firstAttendanceUserNickname
에 nickname
할당해 주는 것도 괜찮을 것 같습니다..!
6a387ce
to
cd31e40
Compare
rebase 한 번 부탁드립니다! |
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.
성윤이 코멘트 제외 이견 없습니다
수고하셨습니다
4b99075
to
a4d0f55
Compare
a4d0f55
to
3589fa9
Compare
스터디 상세 조회 API 입니다
API 1번에 해당하는 내용입니다
#61 PR 머지 이후 머지할 예정입니다