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