무료 콘텐츠를 못올리는 버그 수정 #21
|
@ -150,14 +150,18 @@ class AudioContentService(
|
|||
val theme = themeQueryRepository.findThemeByIdAndActive(id = request.themeId)
|
||||
?: throw SodaException("잘못된 테마입니다. 다시 선택해 주세요.")
|
||||
|
||||
if (request.price <= 4) throw SodaException("콘텐츠의 최소금액은 5캔 입니다.")
|
||||
if (request.price in 1..4) throw SodaException("콘텐츠의 최소금액은 5캔 입니다.")
|
||||
|
||||
// DB에 값 추가
|
||||
val audioContent = AudioContent(
|
||||
title = request.title,
|
||||
detail = request.detail,
|
||||
type = request.type,
|
||||
price = request.price,
|
||||
price = if (request.price > 0) {
|
||||
request.price
|
||||
} else {
|
||||
0
|
||||
},
|
||||
isAdult = request.isAdult,
|
||||
isGeneratePreview = if (request.type == AudioContentType.INDIVIDUAL) {
|
||||
request.isGeneratePreview
|
||||
|
|
Loading…
Reference in New Issue