[home] /api/v2/home에 현재 미션 포함(홈 집계, 3콜→1콜)#270
Conversation
홈 진입 시 home/mission/profile 3콜 중 mission을 /home에 합침. - HomeV2Response에 mission(CurrentMissionResponse) 추가 - getHomeV2가 ensureInitialized 후 getCurrentMission 포함 반환 (신규 유저 500 방지) - 마이페이지의 /api/v2/users/profile 단독 호출은 유지 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 62e1d3935d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| nickname = user.nickname ?: "", | ||
| todayRetrospectiveCount = todayCount, | ||
| hasUnreadNotification = notificationHistoryFinder.hasUnread(userId), | ||
| mission = missionFinder.getCurrentMission(userId), |
There was a problem hiding this comment.
Handle users with no current mission on home
When a user finishes the level-10 mission, MissionProgressService.awardNextLevel returns without creating another UserMission, while findCurrentMissionByUserId only returns IN_PROGRESS/WAIT_CONFIRM missions, so this new unguarded call throws CURRENT_MISSION_NOT_FOUND and turns /api/v2/home into a 500 for users who complete the mission ladder. Consider returning a terminal/null mission state for home instead of letting the aggregation fail.
Useful? React with 👍 / 👎.
홈 진입 시 home/mission/profile 3콜 중 mission을 /home에 합쳐 1콜로. 마이페이지 프로필 단독 호출은 유지. (레벨-0 변경 후 함께 검토)
🤖 Generated with Claude Code