Skip to content

Commit

Permalink
Merge pull request #26 from Kusitms-29th-Meetup-TeamE/feat/25/main
Browse files Browse the repository at this point in the history
Fix: 메인페이지 응답 날짜 한국어 반영
  • Loading branch information
nohy6630 authored May 8, 2024
2 parents ff6d5c7 + 7c8af7e commit 5b5a84d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
FROM openjdk:17

COPY build/libs/backend-0.0.1-SNAPSHOT.jar app.jar
CMD ["java", "-jar", "app.jar"]
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
import lombok.*;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.List;
import java.util.Locale;

@Builder
@NoArgsConstructor(access = AccessLevel.PROTECTED)
Expand All @@ -19,10 +21,10 @@ public class ReadMainActivityRes {
private Long currentParticipants;
private Long maxParticipants;
private String location;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "MM월 dd일 EEEE")
private LocalDateTime time;
private String time;

public static ReadMainActivityRes of(Activity activity, Boolean isLiked) {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MM월 dd일 EEEE", new Locale("ko", "KR"));
return ReadMainActivityRes.builder()
.personalities(
activity.getPersonalities().stream()
Expand All @@ -34,7 +36,7 @@ public static ReadMainActivityRes of(Activity activity, Boolean isLiked) {
.currentParticipants(activity.getCurrentParticipants())
.maxParticipants(activity.getMaxParticipants())
.location(activity.getLocation())
.time(activity.getTime())
.time(activity.getTime().format(formatter))
.build();
}
}

0 comments on commit 5b5a84d

Please sign in to comment.