-
Notifications
You must be signed in to change notification settings - Fork 1
[FIX] 잘못된 엔드포인트 uri 수정 #289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughSemesterPeriodController의 GET 엔드포인트 경로가 "/semester-periods"에서 "/admin/semester-periods"로 변경되었다. 메서드 시그니처와 반환 구조는 동일하며, 라우팅 어노테이션만 수정되었다. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests
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.
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
📒 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"})저장소 검색에서 레거시 호출을 찾지 못했으나(스크립트 출력 없음) 외부 소비자가 있을 수 있으니 프론트/문서/테스트에서 해당 엔드포인트 호출 여부를 수동 확인하세요.
📌 관련 이슈
✒️ 작업 내용
스크린샷 🏞️ (선택)
💬 REVIEWER에게 요구사항 💬
Summary by CodeRabbit