Skip to content

[refactor] 클럽 지원 양식 불러오기 구버전 api를 제거한다#793

Merged
alsdddk merged 1 commit intodevelop/befrom
refactor/#790-old-api-delete-MOA-294
Oct 12, 2025
Merged

[refactor] 클럽 지원 양식 불러오기 구버전 api를 제거한다#793
alsdddk merged 1 commit intodevelop/befrom
refactor/#790-old-api-delete-MOA-294

Conversation

@alsdddk
Copy link
Collaborator

@alsdddk alsdddk commented Oct 12, 2025

#️⃣연관된 이슈

#790

📝작업 내용

구버전 api 중에 "클럽 지원서 양식 불러오기"를 제거하고,
지난 pr에 주석처리 되어 있던 "클럽의 활성화된 지원서 목록 불러오기" api의 주석을 제거했습니다.
-> 이제 /api/club/{clubId}/apply 로 다중 지원서 모달에 사용될 활성화된 지원서 리스트 반환합니다.

스크린샷 2025-10-12 16 32 03

중점적으로 리뷰받고 싶은 부분(선택)

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요

ex) 메서드 XXX의 이름을 더 잘 짓고 싶은데 혹시 좋은 명칭이 있을까요?

논의하고 싶은 부분(선택)

논의하고 싶은 부분이 있다면 작성해주세요.

🫡 참고사항

Summary by CodeRabbit

  • 신기능

    • 공개 API로 클럽의 활성 지원서 목록 조회 엔드포인트를 제공합니다. 목록 항목은 id와 title을 포함합니다.
  • 리팩터링

    • 기존의 클럽별 최신 지원서 단건 조회 GET 엔드포인트가 제거되었습니다. 제출용 POST 엔드포인트는 그대로입니다.
    • 활성 지원서 목록 응답에서 description 필드가 제거되어 응답 스키마가 간소화되었습니다.

@vercel
Copy link

vercel bot commented Oct 12, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
moadong Ready Ready Preview Comment Oct 12, 2025 0:49am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 12, 2025

Warning

.coderabbit.yaml has a parsing error

The CodeRabbit configuration file in this repository has a parsing error and default settings were used instead. Please fix the error(s) in the configuration file. You can initialize chat with CodeRabbit to get help with the configuration file.

💥 Parsing errors (1)
Validation error: Invalid regex pattern for base branch. Received: "**" at "reviews.auto_review.base_branches[0]"
⚙️ Configuration instructions
  • 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

Walkthrough

구버전 GET /apply 엔드포인트와 관련 서비스 메서드를 제거하고, 공개용 컨트롤러에서 GET /apply를 활성화하여 PublicService를 통해 활성 지원서 목록을 반환하도록 변경. DTO에서 description 필드를 제거하고, 저장소 프로젝션도 해당 필드를 제외하도록 수정.

Changes

Cohort / File(s) Summary
API 엔드포인트 조정
backend/src/main/java/moadong/club/controller/ClubApplyControllerV1.java, backend/src/main/java/moadong/club/controller/ClubApplyPublicController.java
V1 컨트롤러의 GET /apply 제거. Public 컨트롤러의 GET /apply 활성화 및 서비스 호출을 PublicService로 전환.
서비스 레이어 이동/정리
backend/src/main/java/moadong/club/service/ClubApplyPublicService.java, backend/src/main/java/moadong/club/service/ClubApplyAdminService.java, backend/src/main/java/moadong/club/service/ClubApplyServiceV1.java
PublicService에 getActiveApplicationForms 추가. AdminService에서 동명 메서드 제거. ClubApplyServiceV1의 getClubApplicationForm 제거.
DTO/인터페이스 축소
backend/src/main/java/moadong/club/payload/dto/ClubActiveFormResult.java, backend/src/main/java/moadong/club/payload/dto/ClubActiveFormSlim.java
description 필드/메서드 제거로 데이터 모델을 id, title로 축소.
저장소 프로젝션 수정
backend/src/main/java/moadong/club/repository/ClubApplicationFormsRepository.java
findClubActiveFormsByClubId의 프로젝션에서 description 필드 제외.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant C as Client
  participant Ctr as ClubApplyPublicController
  participant S as ClubApplyPublicService
  participant R as ClubApplicationFormsRepository

  C->>Ctr: GET /api/club/{clubId}/apply
  Ctr->>S: getActiveApplicationForms(clubId)
  S->>R: findClubActiveFormsByClubId(clubId)
  alt 활성 폼 존재
    R-->>S: List<ClubActiveFormSlim> (id, title)
    S-->>Ctr: ClubActiveFormsResponse(forms: List<ClubActiveFormResult>)
    Ctr-->>C: 200 OK + Response
  else 없음
    R-->>S: []
    S-->>Ctr: throw RestApiException(ACTIVE_APPLICATION_NOT_FOUND)
    Ctr-->>C: 에러 응답
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

Possibly related PRs

Suggested labels

🔨 Refactor, 📬 API, 💾 BE

Suggested reviewers

  • Zepelown
  • lepitaaar
  • suhyun113
  • yw6938

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed 제목은 구버전 클럽 지원 양식 불러오기 API의 제거라는 주요 변경사항을 명확히 설명하고 있어 PR의 핵심 내용을 간결하게 전달합니다.
Linked Issues Check ✅ Passed 연결된 MOA-294 이슈의 핵심 요구사항인 구버전 클럽 지원 API 삭제가 PR에서 정확히 구현되었으며 새로운 활성화된 지원서 목록 API도 의도대로 활성화되었습니다.
Out of Scope Changes Check ✅ Passed PR의 모든 변경사항은 구버전 API 삭제와 새로운 활성화된 지원서 목록 반환 기능 구현에 직결되며 이 범위를 벗어난 수정은 발견되지 않았습니다.
✨ 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/#790-old-api-delete-MOA-294

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira 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 fe1316b and e062118.

📒 Files selected for processing (8)
  • backend/src/main/java/moadong/club/controller/ClubApplyControllerV1.java (0 hunks)
  • backend/src/main/java/moadong/club/controller/ClubApplyPublicController.java (1 hunks)
  • backend/src/main/java/moadong/club/payload/dto/ClubActiveFormResult.java (1 hunks)
  • backend/src/main/java/moadong/club/payload/dto/ClubActiveFormSlim.java (0 hunks)
  • backend/src/main/java/moadong/club/repository/ClubApplicationFormsRepository.java (1 hunks)
  • backend/src/main/java/moadong/club/service/ClubApplyAdminService.java (0 hunks)
  • backend/src/main/java/moadong/club/service/ClubApplyPublicService.java (2 hunks)
  • backend/src/main/java/moadong/club/service/ClubApplyServiceV1.java (0 hunks)
💤 Files with no reviewable changes (4)
  • backend/src/main/java/moadong/club/service/ClubApplyAdminService.java
  • backend/src/main/java/moadong/club/controller/ClubApplyControllerV1.java
  • backend/src/main/java/moadong/club/service/ClubApplyServiceV1.java
  • backend/src/main/java/moadong/club/payload/dto/ClubActiveFormSlim.java
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-09-30T05:26:41.788Z
Learnt from: alsdddk
PR: Moadong/moadong#765
File: backend/src/main/java/moadong/club/service/ClubApplyService.java:431-435
Timestamp: 2025-09-30T05:26:41.788Z
Learning: In the Moadong codebase's club application feature (backend/src/main/java/moadong/club/), multiple ClubApplicationForm entities can have ACTIVE status for the same clubId, semesterYear, and semesterTerm simultaneously. There is no uniqueness constraint requiring only one ACTIVE form per semester.

Applied to files:

  • backend/src/main/java/moadong/club/service/ClubApplyPublicService.java
  • backend/src/main/java/moadong/club/controller/ClubApplyPublicController.java
📚 Learning: 2025-05-19T05:45:52.957Z
Learnt from: lepitaaar
PR: Moadong/moadong#406
File: backend/src/main/java/moadong/club/service/ClubApplyService.java:34-38
Timestamp: 2025-05-19T05:45:52.957Z
Learning: The code duplication between createClubApplication and editClubApplication methods in ClubApplyService.java is acknowledged but will be addressed in a future refactoring, as per the developer's plan.

Applied to files:

  • backend/src/main/java/moadong/club/service/ClubApplyPublicService.java
🔇 Additional comments (4)
backend/src/main/java/moadong/club/repository/ClubApplicationFormsRepository.java (1)

29-31: 프로젝션 변경이 응답 스펙과 일치합니다

활성 폼 목록을 id/title만 노출하도록 줄여 DTO 축소와 정합성이 맞습니다. 별도 우려 없습니다.

backend/src/main/java/moadong/club/payload/dto/ClubActiveFormResult.java (1)

7-9: DTO 축소가 의도와 부합합니다

응답을 id와 title로 한정해 프론트 요구사항과 맞는 간결한 형태가 되었습니다.

backend/src/main/java/moadong/club/controller/ClubApplyPublicController.java (1)

37-41: 공개 엔드포인트 복원 확인

활성 지원서 목록을 공개 서비스로 위임해 공개 API 경로가 명확히 정리되었습니다.

backend/src/main/java/moadong/club/service/ClubApplyPublicService.java (1)

40-55: 빈 목록 처리 방식 확인 필요

현재는 활성 폼이 없으면 RestApiException(ACTIVE_APPLICATION_NOT_FOUND)를 던집니다. 다중 지원서 모달 등 소비자가 “빈 리스트(200)”를 기대한다면 404가 되면서 흐름이 끊길 수 있습니다. 기존 소비 코드가 예외 상황을 처리하는지 확인 부탁드립니다. 필요하다면 빈 리스트를 반환하도록 조정하는 쪽을 검토해 주세요.


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.

@github-actions
Copy link

Test Results

70 tests   67 ✅  9s ⏱️
11 suites   3 💤
11 files     0 ❌

Results for commit e062118.

Copy link
Member

@Zepelown Zepelown left a comment

Choose a reason for hiding this comment

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

고생하셨습니다!

@alsdddk alsdddk merged commit e8a78ce into develop/be Oct 12, 2025
5 checks passed
@alsdddk alsdddk deleted the refactor/#790-old-api-delete-MOA-294 branch November 19, 2025 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants