Conversation
…nt-MOA-498 [feat] 동아리 지원자 양식 복제 기능 추가
…time-MOA-520 [feat] 외부지원서 허용목록에 에브리타임 주소 추가
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning
|
| 코호트 / 파일(들) | 변경 요약 |
|---|---|
Club Application Form 복제 기능 backend/src/main/java/moadong/club/controller/ClubApplyAdminController.java |
새 POST 엔드포인트 {applicationFormId}/duplicate 추가. 현재 사용자와 애플리케이션 ID를 받아 복제 서비스 호출 |
Club Application Form 복제 기능 backend/src/main/java/moadong/club/service/ClubApplyAdminService.java |
duplicateClubApplicationForm() 메서드 추가. 기존 신청 폼을 조회하여 제목을 "무제"로 설정한 새 폼으로 복제 후 저장. 와일드카드 import를 명시적 import로 변경 |
도메인 허용 목록 업데이트 backend/src/main/java/moadong/club/entity/ClubApplicationForm.java |
외부 신청 URL 허용 목록에 "https://everytime.kr" 도메인 추가 |
Estimated code review effort
🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
- [feat] 동아리 지원자 양식 복제 기능 추가 #1020 - 동일한 클럽 신청 폼 복제 API와 서비스 메서드 추가
- [feat] 외부지원서 허용목록에 에브리타임 주소 추가 #1044 -
ClubApplicationForm에서 "https://everytime.kr" 도메인을 허용 목록에 추가 - [feature] applicationForm delete 구현 #854 -
ClubApplyAdminController와ClubApplyAdminService에 새로운 관리자 엔드포인트 및 서비스 메서드 추가
Suggested reviewers
- oesnuj
- seongwon030
- suhyun113
- PororoAndFriends
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Title check | ❓ Inconclusive | PR 제목은 '릴리즈' 태그를 사용하고 있지만, 실제 변경사항은 동아리 지원 양식 복제 기능 추가와 허용 도메인 추가이며, 제목은 이러한 구체적인 변경사항을 반영하지 않고 너무 일반적입니다. | PR 제목을 더 구체적으로 수정하세요. 예: '[feat] 동아리 지원 양식 복제 기능 및 에브리타임 도메인 추가' 또는 '[release] 동아리 관리 기능 개선 v1.1.1' |
✅ Passed checks (2 passed)
| Check name | Status | Explanation |
|---|---|---|
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing touches
- 📝 Generate docstrings
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 @coderabbitai help to get the list of available commands and usage tips.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@backend/src/main/java/moadong/club/service/ClubApplyAdminService.java`:
- Around line 137-144: The new ClubApplicationForm is being built using
oldApplicationForm.getQuestions() which shares the same List reference and can
be cleared by ClubApplicationForm.updateQuestions(); change the builder step
that sets questions in ClubApplicationForm to pass a new copy of the list (e.g.,
new ArrayList<>(oldApplicationForm.getQuestions())) or perform a deep copy of
individual question objects if they are mutable, so newApplicationForm has its
own independent questions collection.
🧹 Nitpick comments (1)
backend/src/main/java/moadong/club/controller/ClubApplyAdminController.java (1)
83-91: 복제된 폼의 ID 반환 고려현재 구현은 성공 메시지만 반환합니다. 클라이언트가 복제된 폼으로 바로 이동하거나 편집할 수 있도록 새 폼의 ID를 반환하면 UX가 개선될 수 있습니다.
♻️ 새 폼 ID 반환 예시
서비스 메서드가 새 폼 ID를 반환하도록 수정:
- public void duplicateClubApplicationForm(String applicationFormId, CustomUserDetails user) { + public String duplicateClubApplicationForm(String applicationFormId, CustomUserDetails user) { // ... 기존 로직 ... - clubApplicationFormsRepository.save(newApplicationForm); + ClubApplicationForm saved = clubApplicationFormsRepository.save(newApplicationForm); + return saved.getId(); }컨트롤러에서 ID 반환:
public ResponseEntity<?> duplicateClubApplicationForm(`@PathVariable` String applicationFormId, `@CurrentUser` CustomUserDetails user) { - clubApplyAdminService.duplicateClubApplicationForm(applicationFormId, user); - return Response.ok("success duplicate application"); + String newFormId = clubApplyAdminService.duplicateClubApplicationForm(applicationFormId, user); + return Response.ok(Map.of("message", "success duplicate application", "newFormId", newFormId)); }
| ClubApplicationForm newApplicationForm = ClubApplicationForm.builder() | ||
| .title("무제") | ||
| .clubId(oldApplicationForm.getClubId()) | ||
| .description(oldApplicationForm.getDescription()) | ||
| .formMode(oldApplicationForm.getFormMode()) | ||
| .questions(oldApplicationForm.getQuestions()) | ||
| .externalApplicationUrl(oldApplicationForm.getExternalApplicationUrl()) | ||
| .build(); |
There was a problem hiding this comment.
얕은 복사로 인한 데이터 손상 위험
oldApplicationForm.getQuestions()를 직접 전달하면 두 폼이 동일한 리스트 참조를 공유합니다. ClubApplicationForm.updateQuestions()가 this.questions.clear()를 호출하므로, 한 폼의 질문을 수정하면 다른 폼의 질문도 함께 삭제됩니다.
🐛 새 리스트로 복사하여 수정
ClubApplicationForm newApplicationForm = ClubApplicationForm.builder()
.title("무제")
.clubId(oldApplicationForm.getClubId())
.description(oldApplicationForm.getDescription())
.formMode(oldApplicationForm.getFormMode())
- .questions(oldApplicationForm.getQuestions())
+ .questions(new ArrayList<>(oldApplicationForm.getQuestions()))
.externalApplicationUrl(oldApplicationForm.getExternalApplicationUrl())
.build();📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ClubApplicationForm newApplicationForm = ClubApplicationForm.builder() | |
| .title("무제") | |
| .clubId(oldApplicationForm.getClubId()) | |
| .description(oldApplicationForm.getDescription()) | |
| .formMode(oldApplicationForm.getFormMode()) | |
| .questions(oldApplicationForm.getQuestions()) | |
| .externalApplicationUrl(oldApplicationForm.getExternalApplicationUrl()) | |
| .build(); | |
| ClubApplicationForm newApplicationForm = ClubApplicationForm.builder() | |
| .title("무제") | |
| .clubId(oldApplicationForm.getClubId()) | |
| .description(oldApplicationForm.getDescription()) | |
| .formMode(oldApplicationForm.getFormMode()) | |
| .questions(new ArrayList<>(oldApplicationForm.getQuestions())) | |
| .externalApplicationUrl(oldApplicationForm.getExternalApplicationUrl()) | |
| .build(); |
🤖 Prompt for AI Agents
In `@backend/src/main/java/moadong/club/service/ClubApplyAdminService.java` around
lines 137 - 144, The new ClubApplicationForm is being built using
oldApplicationForm.getQuestions() which shares the same List reference and can
be cleared by ClubApplicationForm.updateQuestions(); change the builder step
that sets questions in ClubApplicationForm to pass a new copy of the list (e.g.,
new ArrayList<>(oldApplicationForm.getQuestions())) or perform a deep copy of
individual question objects if they are mutable, so newApplicationForm has its
own independent questions collection.
BE v1.1.1 릴리즈
Summary by CodeRabbit
릴리스 노트
✏️ Tip: You can customize this high-level summary in your review settings.