-
Notifications
You must be signed in to change notification settings - Fork 2
refactor: 이벤트 조회 공용 API를 어드민용 API와 참가자용 API로 분리 #1281
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
📝 WalkthroughWalkthroughCommonEventController가 제거되고, 그 기능이 AdminEventController와 ParticipantEventController에 새로운 GET 엔드포인트로 분산됩니다. 각 컨트롤러에 Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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 |
kckc0608
left a 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.
lgtm
Job Summary for GradleCheck Style and Test to Develop :: build-test
|
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: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
src/main/java/com/gdschongik/gdsc/domain/event/api/AdminEventController.java(2 hunks)src/main/java/com/gdschongik/gdsc/domain/event/api/CommonEventController.java(0 hunks)src/main/java/com/gdschongik/gdsc/domain/event/api/ParticipantEventController.java(1 hunks)
💤 Files with no reviewable changes (1)
- src/main/java/com/gdschongik/gdsc/domain/event/api/CommonEventController.java
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-09-03T16:49:19.668Z
Learnt from: kckc0608
Repo: gdg-hongik-univ/gdsc-server PR: 1180
File: src/main/java/com/gdschongik/gdsc/domain/event/dto/request/AfterPartyUpdateTarget.java:3-7
Timestamp: 2025-09-03T16:49:19.668Z
Learning: AfterPartyUpdateTarget enum은 서비스 계층에서도 사용되므로 dto.request 패키지가 아닌 도메인 패키지에 위치해야 한다는 아키텍처 관점이 있다.
Applied to files:
src/main/java/com/gdschongik/gdsc/domain/event/api/AdminEventController.java
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build-test
🔇 Additional comments (1)
src/main/java/com/gdschongik/gdsc/domain/event/api/ParticipantEventController.java (1)
3-27: EventDto import path is correct—no changes neededThe import path
com.gdschongik.gdsc.domain.event.dto.dto.EventDtois the actual, legitimate package structure in the codebase. The nesteddto.dtopath reflects the directory structure atsrc/main/java/com/gdschongik/gdsc/domain/event/dto/dto/EventDto.java.EventDto fields (eventId, name, venue, startAt, description, applicationPeriod, status flags, and capacity counts) contain no sensitive or admin-only information, making it safe for the public-facing participant endpoint.
SecurityConfig correctly restricts
/admin/eventsto ADMIN role while allowing/participant/**as public access.
| package com.gdschongik.gdsc.domain.event.api; | ||
|
|
||
| import com.gdschongik.gdsc.domain.event.application.EventService; | ||
| import com.gdschongik.gdsc.domain.event.dto.dto.EventDto; |
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.
EventDto import 패키지 경로 오타로 인한 컴파일 오류 가능성
EventDto import가 현재 다음과 같이 되어 있습니다.
import com.gdschongik.gdsc.domain.event.dto.dto.EventDto;패키지 계층을 보면 dto.dto 처럼 dto가 두 번 반복되는 구조는 비정상일 가능성이 높습니다. 실제 EventDto 클래스 위치를 한 번 확인하시고, 아래처럼 수정이 필요해 보입니다.
-import com.gdschongik.gdsc.domain.event.dto.dto.EventDto;
+import com.gdschongik.gdsc.domain.event.dto.EventDto;단건 조회 메서드 자체(getEvent)는 eventService.getEvent(eventId)에 위임하고 200 OK로 감싸는 패턴이라, import만 올바르면 정상 동작할 것 같습니다.
Also applies to: 28-33
🤖 Prompt for AI Agents
In src/main/java/com/gdschongik/gdsc/domain/event/api/AdminEventController.java
around lines 4 and 28-33, the EventDto import path is incorrect (contains
duplicate dto segment) causing compile errors; open the file, verify the actual
package of EventDto (likely com.gdschongik.gdsc.domain.event.dto.EventDto),
replace the erroneous import com.gdschongik.gdsc.domain.event.dto.dto.EventDto
with the correct package, then recompile to ensure the getEvent method and other
references resolve correctly.
Sangwook02
left a 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.
lgtm
uwoobeat
left a 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.
rnt
🌱 관련 이슈
📌 작업 내용 및 특이사항
[문제 상황]
/common/events/{eventId}를 사용해 SecurityFilter에서 토큰이 없는 비회원은 401 반환[해결안]
/participant/events)와 어드민용 API 로 분리향후에 두 API의 응답 필드가 달라질 가능성도 충분해 보임
📝 참고사항
📚 기타
Summary by CodeRabbit
릴리스 노트
새로운 기능
개선
✏️ Tip: You can customize this high-level summary in your review settings.