Skip to content

Conversation

@rlajm1203
Copy link
Contributor

@rlajm1203 rlajm1203 commented Sep 24, 2025

📌 관련 이슈

✒️ 작업 내용

  • 잘못된 Semester 조회 엔드포인트 URI를 수정합니다.

스크린샷 🏞️ (선택)

💬 REVIEWER에게 요구사항 💬

Summary by CodeRabbit

  • Refactor
    • 학기 기간 조회 API의 GET 엔드포인트 경로를 "/semester-periods"에서 "/admin/semester-periods"로 변경했습니다.
    • 기존 경로는 더 이상 제공되지 않으므로, 클라이언트와 통합 환경에서 호출 URL을 반드시 업데이트하세요.
    • 접근 제어 정책과 라우팅/프록시 규칙, 모니터링 대시보드 및 알림 설정도 새 경로에 맞게 점검을 권장합니다.

@rlajm1203 rlajm1203 requested a review from kssumin September 24, 2025 13:38
@rlajm1203 rlajm1203 self-assigned this Sep 24, 2025
@rlajm1203 rlajm1203 added the bug Something isn't working label Sep 24, 2025
@coderabbitai
Copy link

coderabbitai bot commented Sep 24, 2025

Walkthrough

SemesterPeriodController의 GET 엔드포인트 경로가 "/semester-periods"에서 "/admin/semester-periods"로 변경되었다. 메서드 시그니처와 반환 구조는 동일하며, 라우팅 어노테이션만 수정되었다.

Changes

Cohort / File(s) Summary of Changes
라우팅 경로 업데이트
eeos/src/main/java/com/blackcompany/eeos/program/presentation/controller/SemesterPeriodController.java
@GetMapping("/semester-periods")@GetMapping("/admin/semester-periods")로 변경. 메서드 로직/시그니처 변화 없음.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

깡총, 깡총, 경로를 살짝 고쳤네
/semester-periods 에서 관리자 굴로 쏙—
문패만 바꾸고 내용은 그대로,
발자국 한 줄, 로그는 조용히 웃고 🙂
다음 점프는 어디로 갈까, 토끼는 또 준비 끝!

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 (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed 제목 "[FIX] 잘못된 엔드포인트 uri 수정"은 PR의 핵심 변경사항인 잘못된 Semester 엔드포인트 URI("/semester-periods" → "/admin/semester-periods") 수정을 간결하고 명확하게 설명합니다. 짧고 관련성이 높아 동료가 변경의 주된 목적을 빠르게 이해할 수 있습니다.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch BM/hotfix/semester-endpoint

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.

@rlajm1203 rlajm1203 requested a review from Daae-Kim September 24, 2025 13:38
@github-actions
Copy link

Test Results

101 tests  ±0   98 ✅ ±0   5s ⏱️ ±0s
 40 suites ±0    3 💤 ±0 
 40 files   ±0    0 ❌ ±0 

Results for commit 9182ada. ± Comparison against base commit ab037d9.

@rlajm1203 rlajm1203 merged commit 1e94f5c into develop Sep 24, 2025
3 of 4 checks passed
@rlajm1203 rlajm1203 deleted the BM/hotfix/semester-endpoint branch September 24, 2025 13:40
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
eeos/src/main/java/com/blackcompany/eeos/program/presentation/controller/SemesterPeriodController.java (2)

24-31: ADMIN 보호를 메서드 보안으로 강제하여 TODO 보완

인터셉터 기반 검증(TODO)만으로는 누락 위험이 있습니다. 메서드 수준 보안을 추가해 이중으로 방어하세요.

적용 제안(diff):

@@
-	@PutMapping("/admin/semester-periods") // TODO : 인터셉터 단에서 어드민 검증
+	@PutMapping("/admin/semester-periods") // TODO : 인터셉터 단에서 어드민 검증
+	@PreAuthorize("hasRole('ADMIN')")
@@
-	@GetMapping("/admin/semester-periods")
+	@GetMapping("/admin/semester-periods")
+	@PreAuthorize("hasRole('ADMIN')")

추가 import:

import org.springframework.security.access.prepost.PreAuthorize;

Also applies to: 33-38


24-31: 업데이트에 201(CREATED) 사용 — 200/204로의 정렬 고려

PUT 업데이트에 201은 비표준에 가깝습니다. 일관성을 위해 200(OK) 또는 204(No Content)로 맞추는 것을 권장합니다. 동일 컨벤션을 사용하는 다른 업데이트 API와도 정렬해 주세요.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ab037d9 and 9182ada.

📒 Files selected for processing (1)
  • eeos/src/main/java/com/blackcompany/eeos/program/presentation/controller/SemesterPeriodController.java (1 hunks)
🔇 Additional comments (1)
eeos/src/main/java/com/blackcompany/eeos/program/presentation/controller/SemesterPeriodController.java (1)

33-38: 브레이킹 변경 — 레거시 /semester-periods 경로 호환 라우트 추가 권장

GET 경로를 /api/semester-periods → /api/admin/semester-periods로 변경하면 프론트/테스트/문서 소비자가 깨질 수 있으니 당분간 두 경로를 동시에 허용하세요.

-	@GetMapping("/admin/semester-periods")
+	// TODO: 레거시 경로는 클라이언트 이관 완료 후 제거
+	@GetMapping({"/admin/semester-periods", "/semester-periods"})

저장소 검색에서 레거시 호출을 찾지 못했으나(스크립트 출력 없음) 외부 소비자가 있을 수 있으니 프론트/문서/테스트에서 해당 엔드포인트 호출 여부를 수동 확인하세요.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants