Skip to content

FEAT] 모임 V2 테스트 개선과 HTTP Method 수정#157

Merged
LimdaeIl merged 1 commit intomainfrom
feat/group-swagger-update
Dec 23, 2025
Merged

FEAT] 모임 V2 테스트 개선과 HTTP Method 수정#157
LimdaeIl merged 1 commit intomainfrom
feat/group-swagger-update

Conversation

@LimdaeIl
Copy link
Collaborator

@LimdaeIl LimdaeIl commented Dec 23, 2025

📝 Pull Request

📌 PR 종류

해당하는 항목에 체크해주세요.

  • 기능 추가 (Feature)
  • 버그 수정 (Fix)
  • 문서 수정 (Docs)
  • 코드 리팩터링 (Refactor)
  • 테스트 추가 (Test)
  • 기타 변경 (Chore)

✨ 변경 내용

모임 V2 테스트를 개선과 http method를 합니다.

🔍 관련 이슈

🧪 테스트

변경된 기능에 대한 테스트 범위 또는 테스트 결과를 작성해주세요.

  • 유닛 테스트 추가 / 수정
  • 통합 테스트 검증
  • 수동 테스트 완료

🚨 확인해야 할 사항 (Checklist)

PR을 제출하기 전에 아래 항목들을 확인해주세요.

  • 코드 포매팅 완료
  • 불필요한 파일/코드 제거
  • 로직 검증 완료
  • 프로젝트 빌드 성공
  • 린트/정적 분석 통과 (해당 시)

🙋 기타 참고 사항

리뷰어가 참고하면 좋을 만한 추가 설명이 있다면 적어주세요.

Summary by CodeRabbit

릴리스 노트

  • 리팩터링
    • 그룹 참석 상태 관리 엔드포인트의 HTTP 메서드를 POST에서 PATCH로 변경하여 RESTful 표준 준수 개선 (승인, 거부, 추방, 밴 작업)
    • 차단 해제 기능을 새로운 PATCH 엔드포인트로 통합하여 일관된 API 구조 제공

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

@LimdaeIl LimdaeIl self-assigned this Dec 23, 2025
Copilot AI review requested due to automatic review settings December 23, 2025 06:35
@LimdaeIl LimdaeIl added the ✨enhancement New feature or request label Dec 23, 2025
@LimdaeIl LimdaeIl moved this from Backlog to In progress in WeGo-Together Backend Dec 23, 2025
@coderabbitai
Copy link

coderabbitai bot commented Dec 23, 2025

Caution

Review failed

The pull request is closed.

🎯 요약

Walkthrough

GroupV2Controller의 승인, 거절, 추방, 차단 엔드포인트의 HTTP 메서드를 POST에서 PATCH로 변경했으며, 차단 해제 엔드포인트를 POST에서 PATCH로 재구성했습니다. 해당 테스트 케이스들도 동일하게 HTTP 메서드를 업데이트했습니다.

Changes

🗂️ 코호트 / 파일(들) 📋 변경 사항
컨트롤러 HTTP 메서드 변경
src/main/java/team/wego/wegobackend/group/v2/presentation/GroupV2Controller.java
@PostMapping에서 @PatchMapping으로 변경: approve, reject, kick, ban 엔드포인트. 차단 해제(unban) 엔드포인트를 POST에서 PATCH로 이전.
승인/거절 테스트 케이스
src/test/http/group/v2/v2-group-approve-reject.http
6-1, 6-2, 7-1, 7-2, 8-1 케이스의 HTTP 메서드를 POST에서 PATCH로 변경.
차단/차단 해제 테스트 케이스
src/test/http/group/v2/v2-group-ban-unban.http
6-1, 6-2, 6-3(ban), 9-1, 9-2, 9-3(unban) 케이스의 HTTP 메서드를 POST에서 PATCH로 변경.
추방 대상 테스트 케이스
src/test/http/group/v2/v2-group-kick-targets.http
5-1, 5-2 케이스의 HTTP 메서드를 GET에서 PATCH로 변경. 5-2의 인증 토큰 컨텍스트 조정.
추방 테스트 케이스
src/test/http/group/v2/v2-group-kick.http
다양한 추방 시나리오(member1, host, member2 토큰)의 HTTP 메서드를 POST에서 PATCH로 변경.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 POST에서 PATCH로 변신했네,
상태 변경은 부분 업데이트 맞게!
일관성 있는 REST 시멘틱스 💫
테스트도 함께 춤을 춘다 ✨

✨ 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 feat/group-swagger-update

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b2fc54f and 71276dd.

📒 Files selected for processing (5)
  • src/main/java/team/wego/wegobackend/group/v2/presentation/GroupV2Controller.java
  • src/test/http/group/v2/v2-group-approve-reject.http
  • src/test/http/group/v2/v2-group-ban-unban.http
  • src/test/http/group/v2/v2-group-kick-targets.http
  • src/test/http/group/v2/v2-group-kick.http

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.

@LimdaeIl LimdaeIl merged commit baf0935 into main Dec 23, 2025
4 of 5 checks passed
@LimdaeIl LimdaeIl deleted the feat/group-swagger-update branch December 23, 2025 06:36
@github-project-automation github-project-automation bot moved this from In progress to Done in WeGo-Together Backend Dec 23, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates HTTP methods for group attendance management endpoints from POST to PATCH and reorganizes the unban endpoint location in the controller. The changes align with RESTful principles by using PATCH for state modifications of attendance records.

Key changes:

  • Changed HTTP methods from POST to PATCH for attendance state modification endpoints (approve, reject, kick, ban, unban)
  • Relocated the unban endpoint in the controller for better logical grouping with other attendance modification endpoints
  • Updated corresponding HTTP test files to use the new PATCH methods

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/main/java/team/wego/wegobackend/group/v2/presentation/GroupV2Controller.java Changed @PostMapping to @PatchMapping for approve, reject, kick, ban, and unban endpoints; moved unban endpoint to group it with other modification endpoints
src/test/http/group/v2/v2-group-approve-reject.http Updated test cases to use PATCH method for approve and reject operations
src/test/http/group/v2/v2-group-kick.http Updated test cases to use PATCH method for kick operations
src/test/http/group/v2/v2-group-ban-unban.http Updated test cases to use PATCH method for ban and unban operations
src/test/http/group/v2/v2-group-kick-targets.http Incorrectly updated GET requests to PATCH for kick-targets query endpoints

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


### 5-1. HOST가 kick 대상 조회 (kick-targets) - 성공 기대 (HOST 제외 ATTEND 멤버들)
GET http://localhost:8080/api/v2/groups/{{kt_groupId}}/attendance/kick-targets
PATCH http://localhost:8080/api/v2/groups/{{kt_groupId}}/attendance/kick-targets
Copy link

Copilot AI Dec 23, 2025

Choose a reason for hiding this comment

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

The HTTP method should be GET, not PATCH. This endpoint is for querying kick targets, which is a read operation. The controller defines this as a GET endpoint at line 237.

Copilot uses AI. Check for mistakes.

### 5-2. 예외: MEMBER가 kick-targets 조회 (HOST only)
GET http://localhost:8080/api/v2/groups/{{kt_groupId}}/attendance/kick-targets
PATCH http://localhost:8080/api/v2/groups/{{kt_groupId}}/attendance/kick-targets
Copy link

Copilot AI Dec 23, 2025

Choose a reason for hiding this comment

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

The HTTP method should be GET, not PATCH. This endpoint is for querying kick targets, which is a read operation. The controller defines this as a GET endpoint at line 237.

Copilot uses AI. Check for mistakes.
return ResponseEntity.ok(ApiResponse.success(HttpStatus.OK.value(), response));
}

@PatchMapping("/{groupId}/attendance/{targetUserId}/unban")
Copy link

Copilot AI Dec 23, 2025

Choose a reason for hiding this comment

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

This method overrides GroupV2ControllerDocs.unban; it is advisable to add an Override annotation.

Suggested change
@PatchMapping("/{groupId}/attendance/{targetUserId}/unban")
@PatchMapping("/{groupId}/attendance/{targetUserId}/unban")
@Override

Copilot uses AI. Check for mistakes.
@coderabbitai coderabbitai bot mentioned this pull request Jan 1, 2026
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[FEAT] 모임 V2 테스트 개선과 HTTP Method 수정

1 participant