Skip to content

Commit

Permalink
fix: AssignmentResponse 잘못된 값 매핑 수정 (#764)
Browse files Browse the repository at this point in the history
* fix: 잘못된 값 매핑 수정

* docs: 스웨거 설명 수정
  • Loading branch information
Sangwook02 authored Sep 4, 2024
1 parent 7292f33 commit e033b95
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import com.gdschongik.gdsc.domain.study.domain.vo.Assignment;
import io.swagger.v3.oas.annotations.media.Schema;
import java.time.LocalDateTime;
import java.time.LocalTime;

public record AssignmentResponse(
Long studyDetailId,
Expand All @@ -15,7 +14,7 @@ public record AssignmentResponse(
@Schema(description = "주차") Long week,
@Schema(description = "과제 명세 링크") String descriptionLink,
@Schema(description = "과제 상태") StudyStatus assignmentStatus,
@Schema(description = "커리큘럼 시작일") LocalTime curriculumStartAt) {
@Schema(description = "주차 시작일") LocalDateTime studyDetailStartDate) {
public static AssignmentResponse from(StudyDetail studyDetail) {
Assignment assignment = studyDetail.getAssignment();
return new AssignmentResponse(
Expand All @@ -26,6 +25,6 @@ public static AssignmentResponse from(StudyDetail studyDetail) {
studyDetail.getWeek(),
assignment.getDescriptionLink(),
assignment.getStatus(),
studyDetail.getCurriculum().getStartAt());
studyDetail.getPeriod().getStartDate());
}
}

0 comments on commit e033b95

Please sign in to comment.