20260227 #247 출석체크 description 추가#258
Hidden character warning
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (4)
Walkthrough출석 관련 컨트롤러와 서비스에서 OpenAPI 문서 확장, 예외 타입 통일(CustomException/ErrorCode), 메서드 서명 변경(AttendanceStatusUpdateRequest 도입), 라운드 삭제 엔드포인트 추가 및 일부 로그 재배치가 적용됨. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@backend/src/main/java/org/sejongisc/backend/attendance/controller/AttendanceController.java`:
- Line 3: AuthUserUtil.requireUserId currently throws
IllegalStateException("UNAUTHENTICATED") which leads to 500 responses; change it
to throw new CustomException(ErrorCode.UNAUTHENTICATED) so the
GlobalExceptionHandler maps it to 401 consistently (match
AttendanceAuthorizationService behavior). Update the implementation of
AuthUserUtil.requireUserId to construct and throw
CustomException(ErrorCode.UNAUTHENTICATED) instead of IllegalStateException,
leaving callers unchanged (there are ~14 call sites across controllers) and
ensure imports reference CustomException and ErrorCode.UNAUTHENTICATED.
In
`@backend/src/main/java/org/sejongisc/backend/attendance/controller/SessionUserController.java`:
- Around line 43-65: The API docs in SessionUserController.java are missing the
UNAUTHENTICATED (401) error in the error-code lists for authenticated endpoints;
update the Javadoc/Swagger description blocks in SessionUserController to
include a 401 UNAUTHENTICATED entry for each authenticated endpoint (the three
documented blocks referenced around lines for add/join/remove participant and
the other blocks in ranges 82-100 and 117-133), ensuring the error name
"UNAUTHENTICATED" and brief message (e.g., "인증이 필요합니다") are added to the error
code lists so clients can handle authentication failures; locate these blocks in
the SessionUserController class (the JavaDoc/annotation blocks tied to the
controller methods that manage session participants) and add the 401 entry
consistently to each.
In
`@backend/src/main/java/org/sejongisc/backend/attendance/service/AttendanceService.java`:
- Around line 116-117: The current use of String.valueOf(request.getStatus()) in
AttendanceService turns a null status into the literal "null", breaking null
validation (e.g. STATUS_REQUIRED). Change the assignment to preserve nulls
instead of converting them: read the raw request.getStatus() (or explicitly set
to null when request.getStatus() == null) and let the existing
null-check/validation (STATUS_REQUIRED) handle it; update any downstream checks
in AttendanceService that expect a null to validate accordingly.
In
`@backend/src/main/java/org/sejongisc/backend/attendance/service/SessionUserService.java`:
- Around line 61-63: The info-level log "세션 사용자 추가" is being written before the
DB changes complete and can misrepresent success if later DB ops
(createAbsentForPastRounds, attendanceRepository.deleteAll..., etc.) fail and
trigger a rollback; move the log.info call in SessionUserService so it executes
after createAbsentForPastRounds and any subsequent repository delete/save calls
(i.e., after all transactional DB work in the method completes) to ensure it
only logs on actual success—apply the same change for the similar log around the
code referenced at lines 79-84.
In `@backend/src/main/java/org/sejongisc/backend/common/exception/ErrorCode.java`:
- Line 142: The ErrorCode enum entry ROUND_NOT_FOUND currently includes
unnecessary backtick characters in its message; open the ErrorCode enum, locate
the ROUND_NOT_FOUND constant, and remove the surrounding backticks so the
message reads "해당 출석 라운드가 존재하지 않습니다." to match the format of other ErrorCode
messages and ensure responses do not include literal backtick characters.
ℹ️ Review info
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (9)
backend/src/main/java/org/sejongisc/backend/attendance/controller/AttendanceController.javabackend/src/main/java/org/sejongisc/backend/attendance/controller/AttendanceRoundController.javabackend/src/main/java/org/sejongisc/backend/attendance/controller/AttendanceSessionController.javabackend/src/main/java/org/sejongisc/backend/attendance/controller/SessionUserController.javabackend/src/main/java/org/sejongisc/backend/attendance/service/AttendanceAuthorizationService.javabackend/src/main/java/org/sejongisc/backend/attendance/service/AttendanceService.javabackend/src/main/java/org/sejongisc/backend/attendance/service/AttendanceSessionService.javabackend/src/main/java/org/sejongisc/backend/attendance/service/SessionUserService.javabackend/src/main/java/org/sejongisc/backend/common/exception/ErrorCode.java
💤 Files with no reviewable changes (1)
- backend/src/main/java/org/sejongisc/backend/attendance/service/AttendanceSessionService.java
#247
Summary by CodeRabbit
새로운 기능
버그 수정
문서화
리팩토링