Skip to content

Conversation

@anxi01
Copy link
Member

@anxi01 anxi01 commented Dec 21, 2025

✅ PR 유형

어떤 변경 사항이 있었나요?

  • 새로운 기능 추가
  • 버그 수정
  • 코드에 영향을 주지 않는 변경사항(오타 수정, 탭 사이즈 변경, 변수명 변경)
  • 코드 리팩토링
  • 주석 추가 및 수정
  • 문서 수정
  • 빌드 부분 혹은 패키지 매니저 수정
  • 파일 혹은 폴더명 수정
  • 파일 혹은 폴더 삭제

🚀 작업 내용

이번 PR에서 작업한 내용을 구체적으로 설명해주세요. (이미지 첨부 가능)

  • 기존 이벤트 조회 API를 무한 스크롤 API로 전환했습니다
    • 기존 API 제거 및 기존 URI를 무한스크롤 API에 적용

📝️ 관련 이슈

본인이 작업한 내용이 어떤 Issue와 관련이 있는지 작성해주세요.


💬 기타 사항 or 추가 코멘트

남기고 싶은 말, 참고 블로그 등이 있다면 기록해주세요.

Summary by CodeRabbit

  • API 변경
    • 사용자 참여 이벤트 조회 엔드포인트: /user/all/v2에서 /user/all로 변경되었습니다. 이전 버전의 엔드포인트는 제거되었습니다.

✏️ Tip: You can customize this high-level summary in your review settings.

@anxi01 anxi01 self-assigned this Dec 21, 2025
@anxi01 anxi01 requested a review from bbbang105 as a code owner December 21, 2025 12:07
@anxi01 anxi01 added 🔄 refactor 코드 리팩토링 😉 seongmin 성민 PR labels Dec 21, 2025
@coderabbitai
Copy link

coderabbitai bot commented Dec 21, 2025

Walkthrough

레거시 비커서 기반 사용자 참여 이벤트 조회 API를 제거하고, 커서 기반 엔드포인트로 통합하는 변경사항입니다. 구 getUserParticipatedEvents() 메서드, 관련 DTO, 상태 코드, 서비스 로직 및 테스트가 삭제되고, 커서 기반 엔드포인트 경로가 /user/all/v2에서 /user/all로 변경되었습니다.

Changes

Cohort / File(s) Change Summary
Controller 계층
src/main/java/side/onetime/controller/EventController.java
getUserParticipatedEvents() 메서드 제거; getParticipatedEventsByCursor() 엔드포인트 경로 /user/all/v2/user/all로 변경
DTO 및 응답 타입
src/main/java/side/onetime/dto/event/response/GetUserParticipatedEventsResponse.java
파일 전체 삭제; GetUserParticipatedEventsResponse 레코드 및 정적 팩토리 메서드 제거
상태 코드
src/main/java/side/onetime/global/common/status/SuccessStatus.java
_GET_USER_PARTICIPATED_EVENTS enum 상수 제거
비즈니스 로직
src/main/java/side/onetime/service/EventService.java
getUserParticipatedEvents() 공개 메서드 제거; 사용자별 참여 이벤트 캐싱 및 매핑 로직 제거
테스트
src/test/java/side/onetime/event/EventControllerTest.java
getUserParticipatedEvents() 테스트 메서드 제거; getParticipatedEventsByCursor() 테스트 엔드포인트 경로 업데이트

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • 주요 검토 대상:
    • 엔드포인트 경로 변경(/user/all/v2/user/all)이 클라이언트 호출 및 API 문서와 일치하는지 확인
    • 제거된 메서드들이 다른 부분에서 참조되지 않는지 확인
    • 레거시 API에서 커서 기반 API로의 완전한 마이그레이션 완료 여부 검증

Possibly related issues

Possibly related PRs

Suggested reviewers

  • bbbang105

Poem

🐰 옛 길을 정리하고 새 길을 열어,
커서 따라 무한 스크롤의 꿈이 펼쳐져.
v1에서 v2로, 말끔한 여정.
토끼도 박수를 치며 응원해! 🌙✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 변경사항의 주요 내용을 명확하게 요약하고 있습니다. 기존 이벤트 조회 API를 무한스크롤 API로 전환하는 리팩토링 작업이 간결하고 구체적으로 표현되어 있습니다.
Description check ✅ Passed PR 설명이 저장소의 템플릿 구조를 따르고 있으며, PR 유형(코드 리팩토링)을 명시하고, 작업 내용과 관련 이슈를 명확히 기재했습니다. 필수 정보가 모두 포함되어 있습니다.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/#306

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b6b90b8 and 0058919.

📒 Files selected for processing (5)
  • src/main/java/side/onetime/controller/EventController.java (1 hunks)
  • src/main/java/side/onetime/dto/event/response/GetUserParticipatedEventsResponse.java (0 hunks)
  • src/main/java/side/onetime/global/common/status/SuccessStatus.java (0 hunks)
  • src/main/java/side/onetime/service/EventService.java (0 hunks)
  • src/test/java/side/onetime/event/EventControllerTest.java (1 hunks)
💤 Files with no reviewable changes (3)
  • src/main/java/side/onetime/dto/event/response/GetUserParticipatedEventsResponse.java
  • src/main/java/side/onetime/global/common/status/SuccessStatus.java
  • src/main/java/side/onetime/service/EventService.java
🧰 Additional context used
📓 Path-based instructions (3)
src/main/java/**/controller/*Controller.java

📄 CodeRabbit inference engine (CLAUDE.md)

src/main/java/**/controller/*Controller.java: Use @RestController annotation for REST API endpoints
Use generic response wrapper ApiResponse with onSuccess() and onFailure() methods for all API responses
Use RESTful API endpoints with /api/v1/ prefix

Files:

  • src/main/java/side/onetime/controller/EventController.java
src/main/java/**/{controller,service}/*.java

📄 CodeRabbit inference engine (CLAUDE.md)

Use constructor injection with @requiredargsconstructor for dependency injection

Files:

  • src/main/java/side/onetime/controller/EventController.java
src/test/java/**/*Test.java

📄 CodeRabbit inference engine (CLAUDE.md)

src/test/java/**/*Test.java: Use Spring REST Docs and SpringDoc OpenAPI for API documentation generation
Use JUnit 5 with Spring Boot Test for unit and integration testing

Files:

  • src/test/java/side/onetime/event/EventControllerTest.java
🧠 Learnings (1)
📚 Learning: 2025-12-21T11:41:05.367Z
Learnt from: CR
Repo: onetime-with-members/backend PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-21T11:41:05.367Z
Learning: Applies to src/main/java/**/controller/*Controller.java : Use RESTful API endpoints with /api/v1/ prefix

Applied to files:

  • src/main/java/side/onetime/controller/EventController.java
⏰ 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 and Push to ECR
🔇 Additional comments (2)
src/test/java/side/onetime/event/EventControllerTest.java (1)

410-414: 테스트 엔드포인트 경로 업데이트 확인 완료.

컨트롤러의 엔드포인트 변경사항과 일치하도록 테스트가 올바르게 업데이트되었습니다. 커서 기반 페이지네이션 기능에 대한 테스트 커버리지가 유지되고 있으며, REST Docs 문서도 새로운 경로를 반영하여 생성됩니다.

src/main/java/side/onetime/controller/EventController.java (1)

133-140: 엔드포인트 경로와 API 응답 구조가 이미 코딩 가이드라인을 준수하고 있습니다. @RestController 어노테이션, /api/v1/ 접두사, ApiResponse<T>.onSuccess() 메서드 사용이 모두 적절히 적용되어 있으며, /user/all/v2 엔드포인트는 코드베이스에 존재하지 않습니다. 현재 엔드포인트 /api/v1/events/user/all은 이미 커서 기반 페이징을 지원하고 있습니다.

Likely an incorrect or invalid review 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

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Member

@bbbang105 bbbang105 left a comment

Choose a reason for hiding this comment

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

LGTM! :)

@anxi01 anxi01 merged commit 88a58a0 into develop Dec 21, 2025
4 checks passed
@anxi01 anxi01 deleted the refactor/#306 branch December 21, 2025 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔄 refactor 코드 리팩토링 😉 seongmin 성민 PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[refactor] : 기존 이벤트 조회 API를 무한스크롤 API로 전환한다

3 participants