Skip to content

Commit

Permalink
Merge pull request #336 from Team-Sopetit/fix/#335-member-mission
Browse files Browse the repository at this point in the history
[FIX] 도전 루틴 조회 버그 수정
  • Loading branch information
Chan531 authored Aug 27, 2024
2 parents c4819ec + 7efe27d commit 891aae7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.soptie.server.domain.challenge.Challenge;
import com.soptie.server.domain.challenge.Mission;
import com.soptie.server.domain.membermission.MemberMission;
import com.soptie.server.domain.theme.Theme;

import io.swagger.v3.oas.annotations.media.Schema;
Expand Down Expand Up @@ -29,9 +30,11 @@ public record GetMemberMissionResponse(
@NotNull String timeTaken
) {

public static GetMemberMissionResponse of(Theme theme, Challenge challenge, Mission mission) {
public static GetMemberMissionResponse of(
MemberMission memberMission, Theme theme, Challenge challenge, Mission mission
) {
return GetMemberMissionResponse.builder()
.routineId(mission.getId())
.routineId(memberMission.getId())
.themeId(theme.getId())
.themeName(theme.getName())
.title(challenge.getName())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,6 @@ private GetMemberMissionResponse toGetMemberMissionResponse(MemberMission member
val mission = missionAdapter.findById(memberMission.getMissionId());
val challenge = challengeAdapter.findById(mission.getChallengeId());
val theme = themeAdapter.findById(challenge.getThemeId());
return GetMemberMissionResponse.of(theme, challenge, mission);
return GetMemberMissionResponse.of(memberMission, theme, challenge, mission);
}
}

0 comments on commit 891aae7

Please sign in to comment.