-
Notifications
You must be signed in to change notification settings - Fork 8
fix: SiteUser 객체 대신 siteUserId를 받도록 #485
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
fix: SiteUser 객체 대신 siteUserId를 받도록 #485
Conversation
Walkthrough
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ 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/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/main/java/com/example/solidconnection/report/controller/ReportController.java (1)
23-25: AuthorizedUser 시그니처 변경 검증 완료 및 선택적 개선 제안
ArgumentResolver 구현 정합성 확인 완료.
- supportsParameter가 long/Long 타입만 처리하도록 올바르게 구현되어 있습니다.
- resolveArgument가 required=true일 때 인증 정보가 없으면 CustomException을 던져 primitive unboxing 문제를 방지합니다.
- required=false일 때는 null을 반환하도록 설계되어 있습니다.
인증 실패 시 예외 흐름 보장됨.
- CustomException(AUTHENTICATION_FAILED)을 통해 401/403 응답이 보장됩니다.
선택적 리팩터링 제안.
- Swagger 문서에서 @parameter(hidden = true) 애노테이션을 적용해 siteUserId를 숨기면 API 문서가 깔끔해집니다.
- 파라미터명을 loginUserId 또는 authorizedUserId로 일관되게 사용하면 가독성이 향상됩니다.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
src/main/java/com/example/solidconnection/report/controller/ReportController.java(1 hunks)
⏰ 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: build
🔇 Additional comments (1)
src/main/java/com/example/solidconnection/report/controller/ReportController.java (1)
26-27: 변경 제안: createReport 엔드포인트 응답 코드 개선
- 서비스 시그니처 확인
현재ReportService.createReport(long, ReportRequest)메서드는void를 반환하고 있어 생성된 리소스 ID를 알 수 없습니다.- 응답 코드 개선
- 최소 변경: HTTP 204 No Content 반환
diff @@ - reportService.createReport(siteUserId, reportRequest); - return ResponseEntity.ok().build(); + reportService.createReport(siteUserId, reportRequest); + return ResponseEntity.noContent().build();
- 추가 변경(선택): 서비스 시그니처를long반환으로 수정한 뒤 HTTP 201 Created +Location헤더 설정
java long reportId = reportService.createReport(siteUserId, reportRequest); URI location = URI.create("/reports/" + reportId); return ResponseEntity.created(location).build();- 테스트 영향 및 수동 검증 필요
현재ReportController관련 단위/통합 테스트가 확인되지 않아, 변경 시 테스트 기대값(상태 코드) 수정 여부를 수동으로 검증해 주세요.
nayonsoso
left a comment
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.
😭😭 어찌 이런일이...
확인해주셔서 감사합니다!!
관련 이슈
작업 내용
특이 사항
이건 반드시 머지되고 배포되어야 합니다 !!
리뷰 요구사항 (선택)