Conversation
|
Caution Review failedThe pull request is closed. 🎯 요약WalkthroughGroupV2Controller의 승인, 거절, 추방, 차단 엔드포인트의 HTTP 메서드를 POST에서 PATCH로 변경했으며, 차단 해제 엔드포인트를 POST에서 PATCH로 재구성했습니다. 해당 테스트 케이스들도 동일하게 HTTP 메서드를 업데이트했습니다. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (5)
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.
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
unbanendpoint 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 |
There was a problem hiding this comment.
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.
|
|
||
| ### 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 |
There was a problem hiding this comment.
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.
| return ResponseEntity.ok(ApiResponse.success(HttpStatus.OK.value(), response)); | ||
| } | ||
|
|
||
| @PatchMapping("/{groupId}/attendance/{targetUserId}/unban") |
There was a problem hiding this comment.
This method overrides GroupV2ControllerDocs.unban; it is advisable to add an Override annotation.
| @PatchMapping("/{groupId}/attendance/{targetUserId}/unban") | |
| @PatchMapping("/{groupId}/attendance/{targetUserId}/unban") | |
| @Override |
📝 Pull Request
📌 PR 종류
해당하는 항목에 체크해주세요.
✨ 변경 내용
모임 V2 테스트를 개선과 http method를 합니다.
🔍 관련 이슈
🧪 테스트
변경된 기능에 대한 테스트 범위 또는 테스트 결과를 작성해주세요.
🚨 확인해야 할 사항 (Checklist)
PR을 제출하기 전에 아래 항목들을 확인해주세요.
🙋 기타 참고 사항
리뷰어가 참고하면 좋을 만한 추가 설명이 있다면 적어주세요.
Summary by CodeRabbit
릴리스 노트
✏️ Tip: You can customize this high-level summary in your review settings.