컬렉션 삭제 로직 변경

This commit is contained in:
현성필
2025-01-21 13:20:49 +09:00
parent 205419a972
commit 137d8592f1
@@ -38,11 +38,7 @@ public class ApiRequestMgmtService {
public void deleteApiCollection(String id) {
ApiCollection collection = apiCollectionRepository.findById(id).orElseThrow(() -> new NotFoundException(String.format(API_COLLECTION_NOT_FOUND, id)));
if (!collection.getApis().isEmpty()) {
throw new RuntimeException("api collection[" + id + "] is not empty");
}
apiCollectionRepository.deleteById(id);
apiCollectionRepository.deleteById(collection.getId());
}
public void createNewApiCollection(ApiCollection collection) {