콘텐츠 상세

- 기존 데이터와의 호환성을 위해 isOnlyRental == true <=> PurchaseOption.RENT_ONLY으로 표현되도록 수정
This commit is contained in:
Klaus 2024-11-08 17:15:19 +09:00
parent cc695c115b
commit 5820117c1a
1 changed files with 14 additions and 2 deletions

View File

@ -577,6 +577,18 @@ class AudioContentService(
false false
} }
val isOnlyRental = if (audioContent.purchaseOption == PurchaseOption.RENT_ONLY) {
true
} else {
audioContent.isOnlyRental
}
val purchaseOption = if (audioContent.isOnlyRental) {
PurchaseOption.RENT_ONLY
} else {
audioContent.purchaseOption
}
return GetAudioContentDetailResponse( return GetAudioContentDetailResponse(
contentId = audioContent.id!!, contentId = audioContent.id!!,
title = audioContent.title, title = audioContent.title,
@ -594,9 +606,9 @@ class AudioContentService(
isActivePreview = audioContent.isGeneratePreview, isActivePreview = audioContent.isGeneratePreview,
isAdult = audioContent.isAdult, isAdult = audioContent.isAdult,
isMosaic = audioContent.isAdult && member.auth == null, isMosaic = audioContent.isAdult && member.auth == null,
isOnlyRental = audioContent.isOnlyRental, isOnlyRental = isOnlyRental,
existOrdered = isExistsAudioContent, existOrdered = isExistsAudioContent,
purchaseOption = audioContent.purchaseOption, purchaseOption = purchaseOption,
orderType = orderType, orderType = orderType,
remainingTime = remainingTime, remainingTime = remainingTime,
creatorOtherContentList = creatorOtherContentList, creatorOtherContentList = creatorOtherContentList,