Skip to content

Commit 1d4cab0

Browse files
authored
fix: 공연 삭제 api 수정 (#558)
1 parent c4ed286 commit 1d4cab0

3 files changed

Lines changed: 2 additions & 10 deletions

File tree

src/main/java/com/back/b2st/domain/performance/controller/AdminPerformanceController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public BaseResponse<PerformanceDetailRes> getPerformanceForAdmin(
100100
* 공연 삭제 (관리자)
101101
* DELETE /api/admin/performances/{performanceId}
102102
*/
103-
@Operation(summary = "공연 삭제", description = "개발 환경의 테스트 데이터 정리용 삭제 API입니다. 운영(prod) 환경에서는 409를 반환합니다.")
103+
@Operation(summary = "공연 삭제", description = "공연을 삭제합니다. 하드 딜리트로 완전히 삭제됩니다.")
104104
@DeleteMapping("/{performanceId}")
105105
public BaseResponse<Void> deletePerformance(
106106
@Parameter(description = "공연 ID", example = "1") @PathVariable Long performanceId) {

src/main/java/com/back/b2st/domain/performance/error/PerformanceErrorCode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public enum PerformanceErrorCode implements ErrorCode {
3434
BOOKING_POLICY_NOT_SET(HttpStatus.BAD_REQUEST, "P305", "예매 정책이 설정되지 않았습니다."),
3535

3636
// 삭제 관련
37-
PERFORMANCE_DELETE_NOT_ALLOWED(HttpStatus.CONFLICT, "P401", "운영 환경에서는 공연을 삭제할 수 없습니다."),
37+
PERFORMANCE_DELETE_NOT_ALLOWED(HttpStatus.CONFLICT, "P401", "공연을 삭제할 수 없습니다."),
3838

3939
// 내부 오류
4040
PERFORMANCE_INTERNAL_ERROR(HttpStatus.INTERNAL_SERVER_ERROR, "P999", "공연 시스템 내부 오류가 발생했습니다.");

src/main/java/com/back/b2st/domain/performance/service/PerformanceService.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,6 @@
4646
import com.back.b2st.global.s3.dto.response.PresignedUrlRes;
4747
import com.back.b2st.global.s3.service.S3Service;
4848

49-
import org.springframework.core.env.Environment;
50-
import org.springframework.core.env.Profiles;
51-
5249
import lombok.RequiredArgsConstructor;
5350

5451
@Service
@@ -74,7 +71,6 @@ public class PerformanceService {
7471
private final TradeRequestRepository tradeRequestRepository;
7572
private final QueueRepository queueRepository;
7673
private final PaymentRepository paymentRepository;
77-
private final Environment environment;
7874

7975
private final PerformanceMapper performanceMapper;
8076
private final S3Service s3Service;
@@ -230,10 +226,6 @@ public PerformanceDetailRes getPerformanceForAdmin(Long performanceId) {
230226
// 관리자: 삭제
231227
@Transactional
232228
public void deletePerformance(Long performanceId) {
233-
if (environment.acceptsProfiles(Profiles.of("prod"))) {
234-
throw new BusinessException(PerformanceErrorCode.PERFORMANCE_DELETE_NOT_ALLOWED);
235-
}
236-
237229
if (!performanceRepository.existsById(performanceId)) {
238230
throw new BusinessException(PerformanceErrorCode.PERFORMANCE_NOT_FOUND);
239231
}

0 commit comments

Comments
 (0)