Skip to content

refactor: server모드 삭제 및 에러코드 추가#839

Merged
alsdddk merged 1 commit intodevelop/befrom
refactor/#837-server-mode-delete-MOA-318
Nov 13, 2025
Merged

refactor: server모드 삭제 및 에러코드 추가#839
alsdddk merged 1 commit intodevelop/befrom
refactor/#837-server-mode-delete-MOA-318

Conversation

@alsdddk
Copy link
Collaborator

@alsdddk alsdddk commented Nov 12, 2025

#️⃣연관된 이슈

#837

📝작업 내용

  • /api/club/application api에서
    기존 성능테스트를 위해 남겨두었던 server 모드를 삭제하였습니다.

  • 지원서 생성 시, 잘못된 학기를 선택했을 때 반환될 에러코드를 구현했습니다.

스크린샷 2025-11-12 15 49 04

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

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

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

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

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

🫡 참고사항

Summary by CodeRabbit

릴리스 노트

  • Refactor

    • 동아리 지원 조회 API를 단순화하여 불필요한 파라미터를 제거하고 일관된 응답 흐름으로 정리했습니다.
  • Bug Fixes

    • 학기 유효성 검사를 강화해 잘못된 학기 입력 시 명확한 오류 코드와 메시지를 반환하도록 개선했습니다.
  • New Features

    • 지원서 작성/응답 화면에 사용할 QuestionTitle 컴포넌트를 추가해 제목 입력 및 표시 경험을 개선했습니다.

@vercel
Copy link

vercel bot commented Nov 12, 2025

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

Project Deployment Preview Comments Updated (UTC)
moadong Error Error Nov 12, 2025 6:57am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 12, 2025

Caution

Review failed

Failed to post review comments

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.
  • You can also validate your configuration using the online YAML validator.
  • 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

동아리 신청 폼 조회 API의 모드 기반 분기(mode 파라미터)를 제거하고 단일 조회 경로로 통합했습니다. 이에 따라 관련 DTO(ClubApplicationFormSlim), 리포지토리 메서드 및 서비스의 그룹화 로직이 삭제되었고, 학기 검증 실패 시 새로운 에러 코드(APPLICATION_SEMESTER_INVALID)로 예외를 던지도록 변경되었습니다.

Changes

Cohort / File(s) 설명
컨트롤러 경로 단순화
backend/src/main/java/moadong/club/controller/ClubApplyAdminController.java
getClubApplications 시그니처에서 mode 파라미터 제거; 항상 getClubApplicationForms(user) 반환하도록 분기 삭제.
서비스 리팩토링
backend/src/main/java/moadong/club/service/ClubApplyAdminService.java
그룹화 관련 메서드(getGroupedClubApplicationForms) 및 관련 helper/필드(ClubRepository 등) 제거; validateSemester의 잘못된 학기 예외를 RestApiException(ErrorCode.APPLICATION_SEMESTER_INVALID)로 변경.
리포지토리 변경
backend/src/main/java/moadong/club/repository/ClubApplicationFormsRepository.java
ClubApplicationFormSlim 프로젝션 및 정렬 기반 조회 메서드(findClubApplicationFormsByClubId(String, Sort)) 삭제, 관련 임포트 제거.
DTO 제거
backend/src/main/java/moadong/club/payload/dto/ClubApplicationFormSlim.java
ClubApplicationFormSlim 인터페이스(프로젝션) 파일 삭제.
에러 코드 추가
backend/src/main/java/moadong/global/exception/ErrorCode.java
APPLICATION_SEMESTER_INVALID(HttpStatus.BAD_REQUEST, "800-7", "올바르지 않은 학기입니다.") 추가.
프론트엔드: UI 컴포넌트 추가
frontend/src/components/application/QuestionTitle/QuestionTitle.tsx
질문 제목 렌더링용 React 컴포넌트 QuestionTitle 추가(빌더/응답 모드, 자동 높이 조절 등).

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant Client
    participant Controller
    participant Service
    participant Repo

    Note over Controller,Service: 이전 흐름 (mode 기반 분기)
    Client->>Controller: GET /api/club/application?mode=server|agg
    alt mode == "server"
        Controller->>Service: getGroupedClubApplicationForms(user)
        Service->>Repo: grouped query / 조합 로직
        Repo-->>Service: grouped results
    else
        Controller->>Service: getClubApplicationForms(user)
        Service->>Repo: 단일 조회 쿼리
        Repo-->>Service: list results
    end
    Service-->>Controller: 응답
    Controller-->>Client: 응답

    Note over Controller,Service: 변경된 흐름 (단일 경로)
    Client->>Controller: GET /api/club/application
    Controller->>Service: getClubApplicationForms(user)
    Service->>Repo: 단일 조회 쿼리
    Repo-->>Service: list results
    Service-->>Controller: 응답
    Controller-->>Client: 응답
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • 검토 포인트:
    • ClubApplicationFormSlim 삭제로 인한 모든 참조(프론트/백 모두) 제거 여부 확인
    • 삭제된 리포지토리 메서드 및 서비스 그룹화 호출이 다른 곳에서 사용되는지 점검
    • validateSemester 변경으로 인한 호출자 예외 처리(기존 IllegalArgumentException 대비) 및 테스트 영향 확인
    • 프론트엔드 QuestionTitle 추가에 따른 스타일/상위 컴포넌트 통합 확인

Possibly related issues

Possibly related PRs

Suggested labels

🔨 Refactor, 💾 BE, 📬 API, 💻 FE

Suggested reviewers

  • Zepelown
  • yw6938

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning 새로 추가된 QuestionTitle 프론트엔드 컴포넌트는 연결된 이슈의 서버 모드 삭제 요구사항과 무관한 변경입니다. QuestionTitle 컴포넌트 추가는 이 PR의 범위 밖입니다. 별도의 PR로 분리하거나 연결된 이슈와의 관계를 명확히 해주세요.
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 (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 PR의 주요 변경 사항인 서버 모드 삭제와 에러코드 추가를 명확하게 요약하고 있습니다.
Linked Issues check ✅ Passed 성능 테스트 결과 반영을 위한 리팩토링 목표에 부합하게 서버 모드 제거와 에러코드 추가 구현이 완료되었습니다.
✨ 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/#837-server-mode-delete-MOA-318

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
Contributor

@lepitaaar lepitaaar left a comment

Choose a reason for hiding this comment

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

기능개발부터 성능측정까지 수고하셨습니다!

@github-actions
Copy link

github-actions bot commented Nov 12, 2025

Test Results

78 tests   75 ✅  14s ⏱️
13 suites   3 💤
13 files     0 ❌

Results for commit 01fe892.

♻️ This comment has been updated with latest results.

@lepitaaar lepitaaar force-pushed the refactor/#837-server-mode-delete-MOA-318 branch from a811f8e to 01fe892 Compare November 12, 2025 06:59
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.

고생하셨습니다.

@yw6938
Copy link
Collaborator

yw6938 commented Nov 13, 2025

수고하셨습니당

@alsdddk alsdddk merged commit 425df19 into develop/be Nov 13, 2025
6 checks passed
@alsdddk alsdddk deleted the refactor/#837-server-mode-delete-MOA-318 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.

4 participants