Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public record FeedItemResponse(
@Schema(description = "대표 이미지 URL", example = "https://example.com/image.jpg")
String imageUrl,
@Schema(description = "좋아요 여부", example = "true") boolean isLiked,
@Schema(description = "작성자 본인 여부", example = "false") boolean isMine,
@Schema(description = "작성자 정보") FeedAuthorResponse author) {}

@Schema(name = "FeedAuthorResponse", description = "피드 작성자 정보")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ public FeedListResponse getFeeds(
history.getCreatedAt(),
imageUrlMap.get(history.getId()),
likedHistoryIds.contains(history.getId()),
history.getMember()
.getId()
.equals(currentMember.getId()),
toAuthorResponse(
history.getMember(),
followedMemberIds.contains(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class 피드_조회_요청_시 {
LocalDateTime.parse("2025-01-01T12:00:00"),
"https://image.test/10.png",
true,
false,
new FeedListResponse.FeedAuthorResponse(
2L,
"clokey2",
Expand Down Expand Up @@ -76,6 +77,7 @@ class 피드_조회_요청_시 {
jsonPath("$.result.items[0].imageUrl")
.value("https://image.test/10.png"))
.andExpect(jsonPath("$.result.items[0].isLiked").value(true))
.andExpect(jsonPath("$.result.items[0].isMine").value(false))
.andExpect(jsonPath("$.result.items[0].author.memberId").value(2L))
.andExpect(jsonPath("$.result.items[0].author.nickname").value("clokey2"))
.andExpect(
Expand Down