Skip to content

[FEATURE] 회원가입/로그인 응답에 userType 추가#46

Merged
fervovita merged 1 commit into
devfrom
feat/#45-auth-user-type
Jun 21, 2026
Merged

[FEATURE] 회원가입/로그인 응답에 userType 추가#46
fervovita merged 1 commit into
devfrom
feat/#45-auth-user-type

Conversation

@fervovita

@fervovita fervovita commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator

🚀 Related issue

Closes #45

#️⃣ Summary

  • 강사/디자이너 회원가입 및 로그인 성공 시 반환되는 응답에 회원의 역할을 구분할 수 있는 userType 필드를 추가

🔧 Changes

  • 회원가입 응답 DTO에 userType 필드 추가
  • 로그인 응답 DTO에 userType 필드 추가

📸 Test Evidence

image

💬 Reviewer Notes

  • 리뷰어나 같이 작업하는 사람들에게 남길 코멘트

Summary by CodeRabbit

릴리스 노트

  • 새로운 기능
    • 로그인 및 회원가입 응답에 사용자 역할(INSTRUCTOR/DESIGNER 등) 정보가 추가되었습니다.

@fervovita fervovita self-assigned this Jun 21, 2026
@fervovita fervovita requested a review from Jong0128 as a code owner June 21, 2026 15:21
@coderabbitai

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro Plus

Run ID: b2342373-867d-41a4-9514-754b55c2d675

📥 Commits

Reviewing files that changed from the base of the PR and between 5c1d48e and 5997366.

📒 Files selected for processing (7)
  • src/main/java/ditda/backend/domain/auth/dto/AuthResult.java
  • src/main/java/ditda/backend/domain/auth/dto/response/LoginResponse.java
  • src/main/java/ditda/backend/domain/auth/dto/response/SignupResponse.java
  • src/main/java/ditda/backend/domain/auth/mapper/AuthResponseMapper.java
  • src/main/java/ditda/backend/domain/auth/service/AuthService.java
  • src/main/java/ditda/backend/domain/auth/service/DesignerAuthService.java
  • src/main/java/ditda/backend/domain/auth/service/InstructorAuthService.java

📝 Walkthrough

Walkthrough

AuthResult 레코드에 UserRole userRole 필드가 추가됐고, LoginResponse/SignupResponse DTO에도 UserRole userType 필드가 추가됐다. AuthResponseMapper와 세 개의 서비스(AuthService, DesignerAuthService, InstructorAuthService)에서 user.getRole() 값을 AuthResult 생성자에 전달하도록 수정됐다.

Changes

인증 응답에 userRole 필드 추가

Layer / File(s) Summary
AuthResult 및 응답 DTO 계약 변경
src/main/java/ditda/backend/domain/auth/dto/AuthResult.java, src/main/java/ditda/backend/domain/auth/dto/response/LoginResponse.java, src/main/java/ditda/backend/domain/auth/dto/response/SignupResponse.java
AuthResult 레코드에 UserRole userRole 필드를 추가하고, LoginResponse/SignupResponse 레코드에 UserRole userType 필드 및 Swagger @Schema 메타데이터를 추가.
매퍼 및 서비스에서 userRole 전달
src/main/java/ditda/backend/domain/auth/mapper/AuthResponseMapper.java, src/main/java/ditda/backend/domain/auth/service/AuthService.java, src/main/java/ditda/backend/domain/auth/service/DesignerAuthService.java, src/main/java/ditda/backend/domain/auth/service/InstructorAuthService.java
AuthResponseMappertoLoginResponse/toSignupResponse에서 result.userRole() 인자를 추가하고, 각 서비스의 AuthResult 생성자 호출에 user.getRole()을 포함하도록 수정.

예상 코드 리뷰 노력

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • Ditda-Official/Ditda-Backend#43: AuthService 및 JWT 발급 로직에서 user.getRole()을 액세스 토큰과 필터에 적용한 PR으로, 이번 PR의 AuthResult에 role 정보를 추가하는 변경과 직접적으로 연관됨.

Suggested reviewers

  • Jong0128
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ 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%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 제목은 주요 변경 사항인 회원가입/로그인 응답에 userType 필드 추가를 명확하게 요약하고 있습니다.
Linked Issues check ✅ Passed 모든 링크된 이슈의 요구사항이 완전히 충족되었습니다. 강사/디자이너 회원가입 응답과 로그인 응답 DTO에 userType 필드가 추가되었습니다.
Out of Scope Changes check ✅ Passed 모든 변경사항이 PR 목표와 직접적으로 관련되어 있으며, 범위를 벗어난 변경사항이 없습니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/#45-auth-user-type

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.

@Jong0128 Jong0128 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

수고하셨습니다!
바로 merge 하셔도 좋을 꺼 같습니다!

@fervovita fervovita merged commit 0d20ce0 into dev Jun 21, 2026
2 checks passed
@fervovita fervovita deleted the feat/#45-auth-user-type branch June 21, 2026 15:27
@fervovita fervovita mentioned this pull request Jun 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] 회원가입/로그인 응답에 userType 추가

2 participants