Conversation
WalkthroughgetCurrentUser가 닉네임 기반 조회에서 Authentication의 UserPrincipal 기반 조회로 변경되었습니다. SecurityContext에서 Authentication을 가져와 principal의 userId로 User를 로드하며, 타입/존재 검증 실패 시 USER_NOT_FOUND 예외를 던집니다. 관련 import가 추가되고 이전 nickname 기반 로직은 제거되었습니다. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Client as Client
participant ClubService as ClubService.getCurrentUser()
participant SecCtx as SecurityContext
participant Auth as Authentication
participant Principal as UserPrincipal
participant UserRepo as UserRepository
Client->>ClubService: 호출
ClubService->>SecCtx: getContext()
SecCtx-->>ClubService: SecurityContext
ClubService->>Auth: getAuthentication()
Auth-->>ClubService: Authentication
alt principal가 UserPrincipal 아님 또는 null
ClubService-->>Client: throw USER_NOT_FOUND
else UserPrincipal 유효
ClubService->>Principal: getPrincipal()
Principal-->>ClubService: userId
ClubService->>UserRepo: findById(userId)
alt User 존재
UserRepo-->>ClubService: User
ClubService-->>Client: User 반환
else 미존재
ClubService-->>Client: throw USER_NOT_FOUND
end
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🔇 Additional comments (2)
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 |
Related issue 🛠
Work Description 📝
Screenshot 📸
Uncompleted Tasks 😅
To Reviewers 📢
닉네임 수정 후 출퇴근 및 재실자 조회 요청 시
닉네임 값을 참조하고 있었어서 사용자 존재 오류가 발생했었기에
해결 후 hotfix로 올립니다!
Summary by CodeRabbit