-
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
Feat : 스터디룸 탈퇴 API 구현 #27
The head ref may contain hidden characters: "LINKODE-14-BE-API-\uC2A4\uD130\uB514\uB8F8-\uD0C8\uD1F4"
Conversation
|
src/main/java/com/linkode/api_server/repository/MemberstudyroomRepository.java
Outdated
Show resolved
Hide resolved
src/main/java/com/linkode/api_server/service/MemberStudyroomService.java
Show resolved
Hide resolved
넵 맞습니다. |
* | ||
* 스트림 문법으로 매핑 | ||
* */ | ||
public MemberStudyroomListResponse getMemberStudyroomList(long memberId){ |
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.
이 부분에서 셀렉트문이 하나 더 날라갈 것 같은데 방장이라면 기존 스터디룸과 달라질 부분이 없으니 CAPTAIN 이라면 그냥 null 로 반환하는 것은 어떨까요??? 근데 또 생각해보면 그 사이에 다른 스터디룸에서 업데이트 된 것을 여기서 채워넣을 수 있어서 좋은 방법인 것 같기두 합니다!
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.
엇 저도 그 부분에대해 고민하였었는데
방장일때 탈퇴가 이루어지지 않아 변경되지않은 리스트또한 상태또한 검증될필요가 있다고 판단하여 일관성있게 반환하도록 하였습니다!
또한 탈퇴 API가 일관되게 최신 스터디룸 리스트 조회기능을 하는게 나을것 같다고 생각했었습니다!
long memberId = jwtProvider.extractIdFromHeader(authorization); | ||
BaseExceptionResponseStatus responseStatus = memberStudyroomService.leaveStudyroom(studyroomId,memberId); | ||
MemberStudyroomListResponse latestStudyroomList = memberStudyroomService.getMemberStudyroomList(memberId); | ||
log.info("Run leaveStudyroom API "); |
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.
엇, log 가 아래에 있어서 위의 쿼리문들이 전부 실행된 이후에 로그가 찍히는데 혹시 의도하신건가요?? 로그찍는 스타일은 사람마다 다르니까 이거는 정말 궁금해서 물어봅니더!
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.
넵! 기본적으로 메서드 로그는 제공되기때문에
저는 정상적으로 서비스단 메소드가 실행되어야
컨트롤러가 돈다고 판단하기위해 디버깅용 로그를 찍어두었습니다!
반환은 문제없이 됩니다!! 수고하셨습니당🥰 |
요약 (Summary)
🔑 변경 사항 (Key Changes)
📝 리뷰 요구사항 (To Reviewers)
확인 방법
쿼리문
주소
스터디원일때만 탈퇴가 가능합니다!