컬렉션, 요청 삭제

This commit is contained in:
현성필
2023-05-15 17:24:57 +09:00
parent 78277d271d
commit 239a562d6f
5 changed files with 167 additions and 56 deletions
@@ -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);
}