feat(channel): 채널 홈 좋아요 응답을 추가한다
This commit is contained in:
@@ -182,7 +182,9 @@ data class CreatorChannelCommunityPostResponse(
|
||||
val dateUtc: String,
|
||||
val existOrdered: Boolean,
|
||||
val likeCount: Int,
|
||||
val commentCount: Int
|
||||
val commentCount: Int,
|
||||
@JsonProperty("isLiked")
|
||||
val isLiked: Boolean
|
||||
) {
|
||||
companion object {
|
||||
fun from(post: CreatorChannelCommunityPost): CreatorChannelCommunityPostResponse {
|
||||
@@ -198,7 +200,8 @@ data class CreatorChannelCommunityPostResponse(
|
||||
dateUtc = post.createdAt.toUtcIso(),
|
||||
existOrdered = post.existOrdered,
|
||||
likeCount = post.likeCount,
|
||||
commentCount = post.commentCount
|
||||
commentCount = post.commentCount,
|
||||
isLiked = post.isLiked
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,6 +135,8 @@ class CreatorChannelHomeControllerTest @Autowired constructor(
|
||||
.andExpect(jsonPath("$.data.notices[0].dateUtc").value("2026-06-12T04:00:00Z"))
|
||||
.andExpect(jsonPath("$.data.notices[0].imageUrl").doesNotExist())
|
||||
.andExpect(jsonPath("$.data.notices[0].audioUrl").doesNotExist())
|
||||
.andExpect(jsonPath("$.data.notices[0].isLiked").value(true))
|
||||
.andExpect(jsonPath("$.data.communities[0].isLiked").value(true))
|
||||
.andExpect(jsonPath("$.data.series[0].isNew").value(true))
|
||||
.andExpect(jsonPath("$.data.series[0].isOriginal").value(true))
|
||||
|
||||
@@ -171,7 +173,8 @@ class CreatorChannelHomeControllerTest @Autowired constructor(
|
||||
isCommentAvailable = true,
|
||||
likeCount = 2,
|
||||
commentCount = 3,
|
||||
isPinned = true
|
||||
isPinned = true,
|
||||
isLiked = true
|
||||
)
|
||||
|
||||
return CreatorChannelHome(
|
||||
|
||||
@@ -61,6 +61,7 @@ class CreatorChannelHomeFacadeTest {
|
||||
assertEquals(301L, response.notices.first().postId)
|
||||
assertEquals("2026-06-12T04:00:00Z", response.notices.first().dateUtc)
|
||||
assertNull(response.notices.first().imageUrl)
|
||||
assertTrue(response.notices.first().isLiked)
|
||||
assertEquals(501L, response.schedules.first().targetId)
|
||||
assertEquals(202L, response.audioContents.first().audioContentId)
|
||||
assertFalse(response.audioContents.first().isOwned)
|
||||
@@ -69,6 +70,7 @@ class CreatorChannelHomeFacadeTest {
|
||||
assertTrue(response.series.first().isNew)
|
||||
assertTrue(response.series.first().isOriginal)
|
||||
assertEquals(302L, response.communities.first().postId)
|
||||
assertTrue(response.communities.first().isLiked)
|
||||
assertEquals(701L, response.fanTalk.latestFanTalk?.fanTalkId)
|
||||
assertEquals("introduce", response.introduce)
|
||||
assertEquals(10, response.activity.liveCount)
|
||||
@@ -101,7 +103,8 @@ class CreatorChannelHomeFacadeTest {
|
||||
isCommentAvailable = true,
|
||||
likeCount = 2,
|
||||
commentCount = 3,
|
||||
isPinned = true
|
||||
isPinned = true,
|
||||
isLiked = true
|
||||
)
|
||||
|
||||
return CreatorChannelHome(
|
||||
|
||||
@@ -290,7 +290,8 @@ class CreatorChannelHomeQueryServiceTest {
|
||||
isCommentAvailable = true,
|
||||
likeCount = 2,
|
||||
commentCount = 3,
|
||||
isPinned = true
|
||||
isPinned = true,
|
||||
isLiked = true
|
||||
)
|
||||
|
||||
return CreatorChannelHome(
|
||||
@@ -736,7 +737,8 @@ private class FakeCreatorChannelCommunityQueryPort : CreatorChannelCommunityQuer
|
||||
isCommentAvailable = true,
|
||||
likeCount = 3,
|
||||
commentCount = 4,
|
||||
isPinned = isPinned
|
||||
isPinned = isPinned,
|
||||
isLiked = true
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user