콘텐츠 업로드
- 구매옵션이 RENT_ONLY 인 경우 기존에 있던 isOnlyRental 필드 true 로 저장
This commit is contained in:
parent
c46d6621ec
commit
52ddefa631
|
@ -170,6 +170,14 @@ class AudioContentService(
|
|||
|
||||
if (request.price in 1..4) throw SodaException("콘텐츠의 최소금액은 5캔 입니다.")
|
||||
|
||||
val isOnlyRental = if (request.limited != null && request.limited > 0) {
|
||||
false
|
||||
} else if (request.purchaseOption == PurchaseOption.RENT_ONLY) {
|
||||
true
|
||||
} else {
|
||||
request.isOnlyRental
|
||||
}
|
||||
|
||||
// DB에 값 추가
|
||||
val audioContent = AudioContent(
|
||||
title = request.title,
|
||||
|
@ -185,7 +193,7 @@ class AudioContentService(
|
|||
isAdult = request.isAdult,
|
||||
purchaseOption = request.purchaseOption,
|
||||
isGeneratePreview = request.isGeneratePreview,
|
||||
isOnlyRental = if (request.limited != null && request.limited > 0) false else request.isOnlyRental,
|
||||
isOnlyRental = isOnlyRental,
|
||||
isCommentAvailable = request.isCommentAvailable
|
||||
)
|
||||
audioContent.theme = theme
|
||||
|
|
Loading…
Reference in New Issue