parent
1a89177ecc
commit
f4d9fa69e4
|
@ -41,8 +41,8 @@ class CreatorAdminSignatureService(
|
|||
val member = memberRepository.findCreatorByIdOrNull(memberId = memberId)
|
||||
?: throw SodaException("잘못된 접근입니다.")
|
||||
|
||||
if (can <= 0) throw SodaException("1캔 이상 입력하세요")
|
||||
if (time < 3 || time > 20) throw SodaException("입력가능한 시간은 3~20초 입니다.")
|
||||
if (can <= 0) throw SodaException("1캔 이상 설정할 수 있습니다.")
|
||||
if (time < 3 || time > 20) throw SodaException("시간은 3초 이상 20초 이하로 설정할 수 있습니다.")
|
||||
|
||||
val signatureCan = SignatureCan(can = can, time = time, isAdult = isAdult)
|
||||
signatureCan.creator = member
|
||||
|
@ -73,11 +73,13 @@ class CreatorAdminSignatureService(
|
|||
val signatureCan = repository.findSignatureByIdOrNull(id = id, memberId = memberId)
|
||||
?: throw SodaException("잘못된 요청입니다.")
|
||||
|
||||
if (can != null && can > 0) {
|
||||
if (can != null) {
|
||||
if (can <= 0) throw SodaException("1캔 이상 설정할 수 있습니다.")
|
||||
signatureCan.can = can
|
||||
}
|
||||
|
||||
if (time != null && time >= 3 && time <= 20) {
|
||||
if (time != null) {
|
||||
if (time < 3 || time > 20) throw SodaException("시간은 3초 이상 20초 이하로 설정할 수 있습니다.")
|
||||
signatureCan.time = time
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue