parent
382de101dd
commit
1a89177ecc
|
@ -41,6 +41,9 @@ 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초 입니다.")
|
||||
|
||||
val signatureCan = SignatureCan(can = can, time = time, isAdult = isAdult)
|
||||
signatureCan.creator = member
|
||||
repository.save(signatureCan)
|
||||
|
@ -70,11 +73,11 @@ class CreatorAdminSignatureService(
|
|||
val signatureCan = repository.findSignatureByIdOrNull(id = id, memberId = memberId)
|
||||
?: throw SodaException("잘못된 요청입니다.")
|
||||
|
||||
if (can != null) {
|
||||
if (can != null && can > 0) {
|
||||
signatureCan.can = can
|
||||
}
|
||||
|
||||
if (time != null) {
|
||||
if (time != null && time >= 3 && time <= 20) {
|
||||
signatureCan.time = time
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue