[SOU-635] 찜 여부가 제대로 반환되지 않는 문제 수정#264
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
개요WishlistRepository의 사용자 ID 기반 조회 메서드 계약을 정렬하고, SouvenirService의 토큰 파싱을 String에서 Long으로 전환한 후, 전체 서비스 계층에서 업데이트된 메서드 호출로 일관성을 맞춥니다. 변경사항Wishlist 조회 메서드 통합
예상 코드 리뷰 노력🎯 3 (중간) | ⏱️ ~25분 관련 PR
제안된 레이블
✨ Finishing Touches📝 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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 645c00f808
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| String userId = extractUserId(authorizationHeader); | ||
| Set<Long> wishlistedIds = userId != null | ||
| ? wishlistRepository.findSouvenirIdsByUserId(userId) | ||
| ? wishlistRepository.findSouvenirIdsByUserUserId(userId) |
There was a problem hiding this comment.
general 추천의 찜 조회 ID를 UUID와 맞추세요
medium: 이 경로의 extractUserId()는 JwtTokenProvider.getUserIdFromToken()에서 나온 DB PK Long을 문자열로 바꾸지만, 새로 호출하는 findSouvenirIdsByUserUserId()는 w.user.userId(UUID)를 조회합니다. 인증 사용자가 /api/countries/souvenirs를 호출해도 numeric ID로 UUID 컬럼을 검색해 항상 빈 Set이 되어 isWishlisted가 false/null처럼 내려가므로, 여기와 toDto()의 동일한 호출은 UserRepository로 UUID를 찾거나 새로 추가한 Long 기반 findSouvenirIdsByUserId(Long)를 사용해야 합니다.
Useful? React with 👍 / 👎.
Summary by CodeRabbit
Bug Fixes