컬렉션, 요청 삭제
This commit is contained in:
@@ -30,6 +30,11 @@ public class ApiRequestMgmtService {
|
||||
}
|
||||
|
||||
public void deleteApiCollection(String id) {
|
||||
ApiCollection collection = apiCollectionRepository.findById(id).orElseThrow(() -> new NotFoundException("api collection[" + id + "] not found"));
|
||||
|
||||
if (collection.getApis().size()>0){
|
||||
throw new RuntimeException("api collection[" + id + "] is not empty");
|
||||
}
|
||||
apiCollectionRepository.deleteById(id);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user