Skip to content

Conversation

@whqtker
Copy link
Member

@whqtker whqtker commented Aug 25, 2025

관련 이슈

작업 내용

특이 사항

이건 반드시 머지되고 배포되어야 합니다 !!

리뷰 요구사항 (선택)

@whqtker whqtker self-assigned this Aug 25, 2025
@whqtker whqtker added the 버그 Something isn't working label Aug 25, 2025
@whqtker whqtker requested review from lsy1307 and wibaek as code owners August 25, 2025 17:53
@coderabbitai
Copy link

coderabbitai bot commented Aug 25, 2025

Walkthrough

    1. 메서드 시그니처 변경.
    1. 서비스 호출 인자 수정.
    • reportService.createReport 호출 시 siteUser.getId() 대신 siteUserId를 직접 전달하도록 수정했습니다.
    1. 임포트 정리.
    • SiteUser 임포트가 제거되었습니다.
    1. 파일 영향 범위.
    • 변경은 src/main/java/com/example/solidconnection/report/controller/ReportController.java 한 파일에 국한됩니다.

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 Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@whqtker whqtker changed the title fix: SiteUser 객체 대신 ID를 받도록 fix: SiteUser 객체 대신 siteUserId를 받도록 Aug 25, 2025
Copy link

@coderabbitai coderabbitai bot left a 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 시그니처 변경 검증 완료 및 선택적 개선 제안

  1. ArgumentResolver 구현 정합성 확인 완료.

    • supportsParameter가 long/Long 타입만 처리하도록 올바르게 구현되어 있습니다.
    • resolveArgument가 required=true일 때 인증 정보가 없으면 CustomException을 던져 primitive unboxing 문제를 방지합니다.
    • required=false일 때는 null을 반환하도록 설계되어 있습니다.
  2. 인증 실패 시 예외 흐름 보장됨.

    • CustomException(AUTHENTICATION_FAILED)을 통해 401/403 응답이 보장됩니다.
  3. 선택적 리팩터링 제안.

    • 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.

📥 Commits

Reviewing files that changed from the base of the PR and between 3f8c493 and 687e4a9.

📒 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 엔드포인트 응답 코드 개선

  1. 서비스 시그니처 확인
     현재 ReportService.createReport(long, ReportRequest) 메서드는 void를 반환하고 있어 생성된 리소스 ID를 알 수 없습니다.
  2. 응답 코드 개선
     - 최소 변경: 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();  
  3. 테스트 영향 및 수동 검증 필요
     현재 ReportController 관련 단위/통합 테스트가 확인되지 않아, 변경 시 테스트 기대값(상태 코드) 수정 여부를 수동으로 검증해 주세요.

Copy link
Collaborator

@nayonsoso nayonsoso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😭😭 어찌 이런일이...
확인해주셔서 감사합니다!!

@whqtker whqtker merged commit c60163f into solid-connection:develop Aug 26, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

버그 Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: SiteUser 객체 대신 siteUserId를 받도록

2 participants