컬렉션 삭제 로직 변경
This commit is contained in:
@@ -38,11 +38,7 @@ public class ApiRequestMgmtService {
|
|||||||
|
|
||||||
public void deleteApiCollection(String id) {
|
public void deleteApiCollection(String id) {
|
||||||
ApiCollection collection = apiCollectionRepository.findById(id).orElseThrow(() -> new NotFoundException(String.format(API_COLLECTION_NOT_FOUND, id)));
|
ApiCollection collection = apiCollectionRepository.findById(id).orElseThrow(() -> new NotFoundException(String.format(API_COLLECTION_NOT_FOUND, id)));
|
||||||
|
apiCollectionRepository.deleteById(collection.getId());
|
||||||
if (!collection.getApis().isEmpty()) {
|
|
||||||
throw new RuntimeException("api collection[" + id + "] is not empty");
|
|
||||||
}
|
|
||||||
apiCollectionRepository.deleteById(id);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void createNewApiCollection(ApiCollection collection) {
|
public void createNewApiCollection(ApiCollection collection) {
|
||||||
|
|||||||
Reference in New Issue
Block a user