Skip to content

Commit

Permalink
[OING-328] feat: DailyCalendarResponse에 PostResponse 필드 추가 (프론트 요청) (#…
Browse files Browse the repository at this point in the history
…247)

* fix: Add the fields of PostResponse in DailyCalendarResponse

* fix: Fix broken CalendarApiTest

* fix: Fix broken CalendarApiTest2
  • Loading branch information
Kwon770 authored May 2, 2024
1 parent 404c361 commit c4ffe00
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 73 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ private boolean getAllFamilyMembersUploaded(Collection<PostResponse> survivalPos

private List<DailyCalendarResponse> convertToDailyCalendarResponse(Collection<PostResponse> posts, String missionContent, boolean allFamilyMembersUploaded) {
return posts.stream().map(post -> switch (PostType.fromString(post.type())) {
case MISSION -> new DailyCalendarResponse(post.createdAt().toLocalDate(), MISSION, post.postId(), post.imageUrl(), missionContent, allFamilyMembersUploaded);
case SURVIVAL -> new DailyCalendarResponse(post.createdAt().toLocalDate(), SURVIVAL, post.postId(), post.imageUrl(), null, allFamilyMembersUploaded);
case MISSION -> DailyCalendarResponse.of(post, missionContent, allFamilyMembersUploaded);
case SURVIVAL -> DailyCalendarResponse.of(post, null, allFamilyMembersUploaded);
}).toList();
}

Expand Down
Loading

0 comments on commit c4ffe00

Please sign in to comment.