feat: 온보딩 완료 API 구현 - #129
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
Included review availability: Your plan includes up to 1 review per rolling hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe PR adds ChangesOnboarding completion
Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: ⚪ Minimal · up to The onboarding completion API change has no actionable merge-blocking risk remaining based on the supplied evidence and is merge-ready after normal checks and review. Sequence Diagram(s)sequenceDiagram
participant Client
participant OnboardingController
participant OnboardingCommandServiceImpl
participant MemberRepository
participant RoutineGroupRepository
Client->>OnboardingController: POST /onboarding/complete
OnboardingController->>OnboardingCommandServiceImpl: completeOnboarding(memberId, CompleteRequest)
OnboardingCommandServiceImpl->>MemberRepository: lock and find member
MemberRepository-->>OnboardingCommandServiceImpl: member
OnboardingCommandServiceImpl->>RoutineGroupRepository: check routine group ownership
RoutineGroupRepository-->>OnboardingCommandServiceImpl: ownership result
OnboardingCommandServiceImpl-->>OnboardingController: StatusResponse
OnboardingController-->>Client: onboarding status response
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
| Member member = memberRepository.findByIdForUpdate(memberId) | ||
| .orElseThrow(() -> new BusinessException(ErrorStatus.MEMBER_NOT_FOUND)); | ||
|
|
||
| if (Boolean.TRUE.equals(member.getOnboardingCompleted())) { |
There was a problem hiding this comment.
문제: 이미 온보딩 완료된 회원이 재요청하면 routineGroupId 소유권 검증(existsByIdAndMember_Id)을 아예 건너뛰고 바로 성공 반환합니다. 재시도 시 다른 사람의 routineGroupId를 보내도 통과된다고 합니다.
대안: 이미 완료 여부와 무관하게 소유권 체크를 먼저 하거나, 의도된 동작이면 코드에 주석으로 명시하는게 좋을것같습니다!
🎋 작업중인 브랜치 및 이슈
🔑 주요 변경사항
POST /onboarding/completeAPI를 구현했습니다.Check List
Summary by CodeRabbit
New Features
Tests