Skip to content

Commit

Permalink
[FIX] curriculum 문자열 출력으로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
bykbyk0401 committed Dec 29, 2023
1 parent 4de0e61 commit 5ef26ca
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public record PartResponse(
String imageUrl,

List<String> partQuestions,
List<String> curriculumContents,
String curriculumContents,
List<String> commonQuestions,
Long curriculumGeneration
) {
Expand All @@ -31,17 +31,15 @@ public record PartResponse(
// part.getImageUrl()
// );

public static PartResponse of(Part part, List<PartQuestion> partQuestions, List<Curriculum> curriculums, CommonQuestion commonQuestion) {
public static PartResponse of(Part part, List<PartQuestion> partQuestions, Curriculum curriculum, CommonQuestion commonQuestion) {
return new PartResponse(
part.getPartContent(),
part.getTypeOfTalent(),
part.getImageUrl(),
partQuestions.stream()
.flatMap(partQuestion -> Stream.of(partQuestion.getPartQuestion1(), partQuestion.getPartQuestion2(), partQuestion.getPartQuestion3()))
.collect(Collectors.toList()),
curriculums.stream()
.map(Curriculum::getContent)
.collect(Collectors.toList()),
curriculum.getContent(),
Arrays.asList(
commonQuestion.getCommonQuestion1(),
commonQuestion.getCommonQuestion2(),
Expand Down

0 comments on commit 5ef26ca

Please sign in to comment.