diff --git a/src/main/java/com/onna/onnaback/domain/apply/application/service/ApplyService.java b/src/main/java/com/onna/onnaback/domain/apply/application/service/ApplyService.java index 3e3150e..8fb0505 100644 --- a/src/main/java/com/onna/onnaback/domain/apply/application/service/ApplyService.java +++ b/src/main/java/com/onna/onnaback/domain/apply/application/service/ApplyService.java @@ -14,6 +14,7 @@ import com.onna.onnaback.domain.member.application.port.in.MemberUseCase; import com.onna.onnaback.domain.member.domain.Member; import com.onna.onnaback.domain.spark.application.port.in.SparkUseCase; +import com.onna.onnaback.domain.spark.domain.CapacityType; import com.onna.onnaback.domain.spark.domain.Spark; import com.onna.onnaback.global.exception.BaseException; import com.onna.onnaback.global.exception.ErrorCode; @@ -38,7 +39,7 @@ public String apply(Member applicant, Long sparkId) throws BaseException { if (loadApplyPort.isAlreadyApply(applicant.getMemberId(), sparkId)) { throw new BaseException(ErrorCode.APPLY_ALREADY); } - if (spark.getMemberCount() >= spark.getCapacity()) { + if (spark.getCapacityType() == CapacityType.LIMIT && spark.getMemberCount() >= spark.getCapacity()) { throw new BaseException(ErrorCode.OVER_MEMBERCOUNT); }