Conversation
약관 동의 상태 업데이트, 사용자 프로필 조회 API endpoint 변경 반영
Walkthrough회원탈퇴(Withdraw) API 연동이 전반적으로 구현되었습니다. AuthRepository에 withdraw 함수가 추가되고, DefaultAuthRepository에서 실제 API 호출 및 토큰 삭제 로직이 구현되었습니다. ReedService의 엔드포인트 경로가 일부 변경되고 withdraw 엔드포인트가 추가되었습니다. SettingsPresenter에서 탈퇴 이벤트 처리 로직이 완성되었습니다. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant SettingsPresenter
participant AuthRepository
participant ReedService
participant Navigator
User->>SettingsPresenter: Withdraw 이벤트 발생
SettingsPresenter->>AuthRepository: withdraw() 호출
AuthRepository->>ReedService: withdraw() API 요청
ReedService-->>AuthRepository: Result 반환
AuthRepository-->>SettingsPresenter: 결과 반환
alt 성공
SettingsPresenter->>Navigator: 로그인 화면으로 이동(루트 리셋)
else 실패
SettingsPresenter->>SettingsPresenter: 에러 핸들링 및 토스트 노출
opt 로그인 필요 에러
SettingsPresenter->>Navigator: 로그인 화면으로 이동(루트 리셋)
end
end
SettingsPresenter->>SettingsPresenter: 로딩 상태 false로 변경
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~15 minutes Assessment against linked issues
Assessment against linked issues: Out-of-scope changes(해당 변경사항과 관련 없는 코드 변경은 발견되지 않았습니다.) Suggested reviewers
Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. ✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
feature/settings/src/main/kotlin/com/ninecraft/booket/feature/settings/SettingsPresenter.kt (1)
107-134: 회원 탈퇴 이벤트 처리가 잘 구현되었습니다.기존 로그아웃 로직과 일관된 패턴으로 구현되어 있고, 코루틴을 통한 비동기 처리, 로딩 상태 관리, 에러 핸들링, 화면 네비게이션이 모두 적절히 처리되었습니다.
다만, 133번 라인에서 bottom sheet를 즉시 숨기는 것보다는 성공 시에만 숨기도록 하는 것이 더 나은 UX를 제공할 수 있습니다:
is SettingsUiEvent.Withdraw -> { + isWithdrawBottomSheetVisible = false scope.launch { try { isLoading = true authRepository.withdraw() .onSuccess { navigator.resetRoot(LoginScreen) } .onFailure { exception -> val handleErrorMessage = { message: String -> Logger.e(message) sideEffect = SettingsSideEffect.ShowToast(message) } handleException( exception = exception, onError = handleErrorMessage, onLoginRequired = { navigator.resetRoot(LoginScreen) }, ) } } finally { isLoading = false } } - isWithdrawBottomSheetVisible = false }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
core/data/api/src/main/kotlin/com/ninecraft/booket/core/data/api/repository/AuthRepository.kt(1 hunks)core/data/impl/src/main/kotlin/com/ninecraft/booket/core/data/impl/repository/DefaultAuthRepository.kt(1 hunks)core/network/src/main/kotlin/com/ninecraft/booket/core/network/service/ReedService.kt(2 hunks)feature/settings/src/main/kotlin/com/ninecraft/booket/feature/settings/SettingsPresenter.kt(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: in the reed-android project's termsagreementscreen.kt, the ontermdetailclick event is intentionally ...
Learnt from: seoyoon513
PR: YAPP-Github/Reed-Android#35
File: feature/login/src/main/kotlin/com/ninecraft/booket/feature/login/TermsAgreementScreen.kt:127-127
Timestamp: 2025-07-09T01:14:29.836Z
Learning: In the Reed-Android project's TermsAgreementScreen.kt, the OnTermDetailClick event is intentionally passed an empty string for the URL parameter because the actual URLs for terms detail pages haven't been decided yet. This is a temporary implementation that will be updated once the URLs are finalized.
Applied to files:
core/network/src/main/kotlin/com/ninecraft/booket/core/network/service/ReedService.kt
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: ci-build
🔇 Additional comments (5)
core/data/api/src/main/kotlin/com/ninecraft/booket/core/data/api/repository/AuthRepository.kt (1)
11-11: 인터페이스에 withdraw() 메서드 추가가 적절합니다.기존 auth 메서드들과 일관된 시그니처를 사용하며, suspend 함수로 비동기 처리를 지원하고 Result 반환 타입을 통해 성공/실패를 명확히 처리할 수 있습니다.
core/data/impl/src/main/kotlin/com/ninecraft/booket/core/data/impl/repository/DefaultAuthRepository.kt (1)
34-37: withdraw() 메서드 구현이 올바릅니다.logout()와 동일한 패턴으로 구현되어 일관성을 유지하며, API 호출 후 토큰을 정리하는 로직이 보안상 적절합니다. runSuspendCatching을 통한 예외 처리도 기존 패턴을 따르고 있습니다.
core/network/src/main/kotlin/com/ninecraft/booket/core/network/service/ReedService.kt (3)
20-20: DELETE import 추가가 적절합니다.회원 탈퇴 API를 위한 HTTP DELETE 메서드 import가 올바르게 추가되었습니다.
39-40: 회원 탈퇴 API 엔드포인트가 올바르게 정의되었습니다.@delete 어노테이션과 "api/v1/auth/withdraw" 경로를 사용한 것이 RESTful API 설계 원칙에 부합하며, 다른 인증 관련 엔드포인트들과 일관성을 유지합니다.
42-47: API 엔드포인트 재구성이 논리적으로 잘 되었습니다.사용자 관련 엔드포인트들을 "User endpoints" 섹션으로 분류하고, 경로를 "api/v1/users/me"로 통일한 것이 API 구조를 더 명확하게 만듭니다. agreeTerms와 getUserProfile 모두 사용자별 리소스이므로 이 변경이 적절합니다.
seoyoon513
left a comment
There was a problem hiding this comment.
서버는 400이지만 코드는 만점이기 때문에 Approve~
약관 동의 상태 업데이트, 사용자 프로필 조회 API endpoint 변경 반영
🔗 관련 이슈
📙 작업 설명
🧪 테스트 내역 (선택)
📸 스크린샷 또는 시연 영상 (선택)
💬 추가 설명 or 리뷰 포인트 (선택)
Summary by CodeRabbit
신규 기능
버그 수정