-
Notifications
You must be signed in to change notification settings - Fork 1
[fix] dto에 학번, 학과 필드 추가 #6
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
base: main
Are you sure you want to change the base?
Conversation
Walkthrough회원가입/로그인 성공 응답에 토큰과 함께 학생번호(studentId), 학과(department)를 포함하도록 응답 스키마와 컨트롤러 호출부를 동기화했다. 실패/기타 응답 경로는 유지되며, 로그아웃/검증 로직의 성공 페이로드는 변경되지 않았다. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant C as Client
participant A as AuthController
participant S as AuthService
participant R as AuthResponse
rect rgba(220,235,245,0.5)
note over C,A: 로그인/회원가입 요청
C->>A: POST /auth/login or /auth/register (credentials)
A->>S: authenticate/register(credentials)
S-->>A: token, studentId, department
A->>R: success(token, studentId, department)
R-->>A: AuthResponse
A-->>C: 200 OK { token, studentId, department }
end
rect rgba(245,225,225,0.5)
note over C,A: 실패 경로(변경 없음)
C->>A: 요청
A->>R: failure(message)
R-->>A: AuthResponse
A-->>C: 4xx { message }
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
Suggested reviewers
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 (3)
src/main/java/com/team/grade_checklist/domain/user/controller/AuthController.java (2)
37-37:department직렬화 값 확인 필요
user.getDepartment().toString()결과가 API 클라이언트가 기대하는 학과 표기(예: 사용자 친화적인 문자열)와 일치하는지 확인해 주세요.Department가 enum이 아니라 엔티티/VO라면 기본toString()이 객체 식별자(com.foo.Department@1a2b3c) 형태로 내려갈 수 있어 응답 품질이 저하될 수 있습니다. 필요 시 명시적인 필드(예:user.getDepartment().getName())를 사용해 주세요.
53-53: 로그인 응답도 동일한 직렬화 이슈 가능성
위와 동일하게user.getDepartment().toString()이 기대 문자열을 반환하는지 확인해 주세요. 필요하다면 명시적인 학과명 접근자 사용을 권장합니다.src/main/java/com/team/grade_checklist/domain/user/dto/response/AuthResponse.java (1)
21-23:message를 호출 측에서 제어할 수 있도록 확장 고려
지금은 성공 응답 팩토리 두 곳 모두 메시지를"인증 성공"으로 고정하고 있습니다. 다른 성공 시나리오(로그인/회원가입 등)에서 메시지를 달리 내려야 한다면 확장성이 떨어질 수 있어, 필요 시 메시지를 인자로 받는 오버로드도 검토해 주세요.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/main/java/com/team/grade_checklist/domain/user/controller/AuthController.java(3 hunks)src/main/java/com/team/grade_checklist/domain/user/dto/response/AuthResponse.java(1 hunks)
학번, 학과 필드 추가
수정했습니다.
Summary by CodeRabbit