Skip to content

Commit 0fac0ff

Browse files
committed
refact: VS 챌린지 overview에 챌린지 완료 상태 응답값 추가
1 parent 8c06311 commit 0fac0ff

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/java/targeter/aim/domain/challenge/dto/ChallengeDto.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,9 @@ public static class ChallengeInfo {
443443
@Schema(description = "총 기간(주)", example = "4")
444444
private Integer totalWeeks;
445445

446+
@Schema(description = "챌린지 상태", example = "IN_PROGRESS | COMPLETED")
447+
private ChallengeStatus status;
448+
446449
public static ChallengeInfo from(Challenge challenge, boolean isLiked) {
447450
return ChallengeInfo.builder()
448451
.writerId(challenge.getHost().getId())
@@ -461,6 +464,7 @@ public static ChallengeInfo from(Challenge challenge, boolean isLiked) {
461464
.startDate(challenge.getStartedAt())
462465
.endDate(challenge.getStartedAt().plusWeeks(challenge.getDurationWeek()).minusDays(1))
463466
.totalWeeks(challenge.getDurationWeek())
467+
.status(challenge.getStatus())
464468
.build();
465469
}
466470
}
@@ -672,7 +676,7 @@ public static class ChallengeInfo {
672676
@Schema(description = "총 기간(주)", example = "4")
673677
private Integer totalWeeks;
674678

675-
@Schema(description = "챌린지 상태", example = "IN_PROGRESS")
679+
@Schema(description = "챌린지 상태", example = "IN_PROGRESS | COMPLETED")
676680
private ChallengeStatus state;
677681

678682
@Schema(description = "공개 여부", example = "PUBLIC")

0 commit comments

Comments
 (0)