Skip to content

feat: 프로필 이메일 및 캘린더 코스 상태 응답 추가 - #69

Merged
kwonwnsduf merged 1 commit into
developfrom
feature/profile-email
Aug 13, 2026
Merged

kwonwnsduf merged 1 commit into
developfrom
feature/profile-email

Conversation

@kwonwnsduf

@kwonwnsduf kwonwnsduf commented Aug 13, 2026 •

Copy link
Copy Markdown
Collaborator

🔗 관련 이슈

  • close #이슈번호

📌 What is this PR?

마이페이지에서 사용자 이메일을 표시하고, 기록 캘린더에서 완료된 코스만 일기 작성 대상으로 구분할 수 있도록 API 응답을 개선합니다.


🔨 Changes

  • GET /users/profile 응답에 email 필드를 추가했습니다.
  • 프로필 조회 및 수정 응답에 사용자 이메일을 매핑했습니다.
  • GET /courses/calendar의 CalendarCourse 응답에 courseStatus 필드를 추가했습니다.
  • 캘린더 응답에서 PLANNING, IN_PROGRESS, COMPLETED, CANCELED 상태를 확인할 수 있습니다.
  • 프론트에서 courseStatus === "COMPLETED"인 코스만 일기 작성 대상으로 활성화할 수 있습니다.
  • 프로필 이메일과 캘린더 코스 상태 반환을 검증하는 테스트를 추가했습니다.

📷 Result

프로필 응답

{                                                                                                                                                                     
  "userId": 1,                                                                                                                                                        
  "email": "user@example.com",                                                                                                                                        
  "nickname": "daytodo",                                                                                                                                              
  "profileImageUrl": "profile.png"                                                                                                                                    
}                                                                                                                                                                     
                                                                                                                                                                      
### 캘린더 코스 응답                                                                                                                                                  
                                                                                                                                                                      
{                                                                                                                                                                     
  "courseId": 100,                                                                                                                                                    
  "courseName": "서울 나들이",                                                                                                                                        
  "participantType": "FRIEND",                                                                                                                                        
  "memberCount": 3,                                                                                                                                                   
  "courseStatus": "COMPLETED"                                                                                                                                         
}                                                                                                                                                                     
                                                                                                                                                                      
### 테스트                                                                                                                                                            
                                                                                                                                                                      
- UserServiceTest                                                                                                                                                     
- ProfileServiceTest                                                                                                                                                  
- UserControllerTest                                                                                                                                                  
- TargetApiSecurityTest                                                                                                                                               
- CourseServiceTest                                                                                                                                                   
                                                                                                                                                                      
관련 테스트와 빌드가 모두 통과했습니다.                                                                                                                               
<br />                                                                                                                                                                
                                                                                                                                                                      
## 💬 To. Reviewer                                                                                                                                                    
                                                                                                                                                                      
- UserResponse.Profile은 조회와 수정 API에서 공통으로 사용되므로 두 응답 모두 email이 포함됩니다.                                                                     
- 캘린더 조회는 기존에 Course 엔티티를 조회하고 있어 courseStatus 추가에 따른 별도 쿼리나 DB 변경은 없습니다.                                                         
- 기존 응답 필드는 유지하고 필드만 추가한 하위 호환 변경입니다.                                                                                                       
<br />                                                                                                                                                                
                                                                                                                                                                      
## ✅ 체크 리스트                                                                                                                                                      
                                                                                                                                                                      
- [ ] base 브랜치(develop 또는 main) 최신 상태 pull 및 충돌 확인 완료                                                                                                 
- [ ] Reviewers 설정                                                                                                                                                  
- [ ] Assignees 설정                                                                                                                                                  
- [ ] Labels 설정


<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

* **New Features**
* Calendar course information now includes each course’s status.
* Profile responses now display the account email address.

* **Bug Fixes**
* Profile updates and retrievals consistently preserve and return email information.
* Calendar results correctly distinguish courses with different statuses.

* **Tests**
* Added coverage for course statuses and email visibility in profile responses.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

@kwonwnsduf kwonwnsduf self-assigned this Aug 13, 2026
@coderabbitai

coderabbitai Bot commented Aug 13, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 7561cf85-9f5b-4c19-8a7f-4bc329d5a125

📥 Commits

Reviewing files that changed from the base of the PR and between 2e2406c and f96707b.

📒 Files selected for processing (10)
  • src/main/java/com/daytodo/domain/course/dto/CourseResponse.java
  • src/main/java/com/daytodo/domain/course/service/CourseService.java
  • src/main/java/com/daytodo/domain/user/dto/UserResponse.java
  • src/main/java/com/daytodo/domain/user/service/ProfileService.java
  • src/main/java/com/daytodo/domain/user/service/UserService.java
  • src/test/java/com/daytodo/domain/course/service/CourseServiceTest.java
  • src/test/java/com/daytodo/domain/user/controller/UserControllerTest.java
  • src/test/java/com/daytodo/domain/user/service/ProfileServiceTest.java
  • src/test/java/com/daytodo/domain/user/service/UserServiceTest.java
  • src/test/java/com/daytodo/global/config/TargetApiSecurityTest.java

📝 Walkthrough

Walkthrough

The PR extends calendar course responses with CourseStatus and profile responses with user email. Course and profile services populate the new fields. Service, controller, and security tests update constructors and verify the returned values.

Changes

Response field updates

Layer / File(s) Summary
Calendar course status
src/main/java/com/daytodo/domain/course/..., src/test/java/com/daytodo/domain/course/service/CourseServiceTest.java
CalendarCourse now includes CourseStatus. CourseService passes the status, and the calendar test verifies status ordering.
Profile email propagation
src/main/java/com/daytodo/domain/user/..., src/test/java/com/daytodo/domain/user/..., src/test/java/com/daytodo/global/config/TargetApiSecurityTest.java
UserResponse.Profile now includes email. Profile services populate it, and related tests verify response construction and JSON output.

Estimated code review effort: 2 (Simple) | ~10 minutes

Mergeability Score: ⚪ Minimal · up to f9670

The PR adds profile email and calendar course-status fields without introducing an identified merge-blocking risk; it is ready to merge after normal checks and review.

Possibly related PRs

Suggested labels: ✨ feature

Suggested reviewers: nariming, hyeoniss

🚥 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 The title clearly summarizes both main changes: adding profile email and calendar course status fields.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/profile-email

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.

@nariming nariming left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

수고하셨습니다!

@kwonwnsduf
kwonwnsduf merged commit 1aeda90 into develop Aug 13, 2026
1 check passed
@kwonwnsduf
kwonwnsduf deleted the feature/profile-email branch August 13, 2026 04:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants