feat(home): 첫 오디오 콘텐츠 가격을 응답한다
This commit is contained in:
@@ -269,6 +269,7 @@ class HomeRecommendationFacade(
|
||||
creatorNickname = creatorNickname,
|
||||
creatorProfileImage = imageUrl(cloudFrontHost, creatorProfileImage),
|
||||
title = title,
|
||||
price = price,
|
||||
coverImage = imageUrl(cloudFrontHost, coverImage),
|
||||
releaseDate = releaseDate.toUtcIso(),
|
||||
isPointAvailable = isPointAvailable
|
||||
|
||||
@@ -66,6 +66,7 @@ data class HomeFirstAudioContentItem(
|
||||
val creatorNickname: String,
|
||||
val creatorProfileImage: String?,
|
||||
val title: String,
|
||||
val price: Int,
|
||||
val coverImage: String?,
|
||||
val releaseDate: String,
|
||||
@JsonProperty("isPointAvailable")
|
||||
|
||||
@@ -22,6 +22,7 @@ class HomeRecommendationResponseTest {
|
||||
creatorNickname = "creator",
|
||||
creatorProfileImage = "https://cdn.test/profile/creator.png",
|
||||
title = "first audio",
|
||||
price = 9,
|
||||
coverImage = "https://cdn.test/cover/audio.png",
|
||||
releaseDate = "2026-06-01T00:00:00Z",
|
||||
isPointAvailable = true
|
||||
@@ -59,6 +60,7 @@ class HomeRecommendationResponseTest {
|
||||
|
||||
val json = objectMapper.readTree(objectMapper.writeValueAsString(response))
|
||||
|
||||
assertEquals(9, json["firstAudioContents"][0]["price"].asInt())
|
||||
assertEquals(true, json["firstAudioContents"][0]["isPointAvailable"].asBoolean())
|
||||
assertFalse(json["firstAudioContents"][0].has("pointAvailable"))
|
||||
assertEquals("https://cdn.test/profile/character.png", json["aiCharacters"][0]["profileImage"].asText())
|
||||
|
||||
Reference in New Issue
Block a user