diff --git a/src/main/java/io/suricate/monitoring/repositories/LibraryRepository.java b/src/main/java/io/suricate/monitoring/repositories/LibraryRepository.java index a3393b186..47fdcd90f 100644 --- a/src/main/java/io/suricate/monitoring/repositories/LibraryRepository.java +++ b/src/main/java/io/suricate/monitoring/repositories/LibraryRepository.java @@ -43,11 +43,4 @@ public interface LibraryRepository extends JpaRepository, JpaSpec * @return The library */ Library findByTechnicalName(String technicalName); - - /** - * Find libraries by technical names - * @param technicalNames The technical names - * @return The libraries - */ - List findByTechnicalNameIn(List technicalNames); } diff --git a/src/main/java/io/suricate/monitoring/services/api/LibraryService.java b/src/main/java/io/suricate/monitoring/services/api/LibraryService.java index fa390bb8e..3f833b1e4 100644 --- a/src/main/java/io/suricate/monitoring/services/api/LibraryService.java +++ b/src/main/java/io/suricate/monitoring/services/api/LibraryService.java @@ -68,16 +68,6 @@ public Page getAll(String search, Pageable pageable) { return libraryRepository.findAll(new LibrarySearchSpecification(search), pageable); } - /** - * Find libraries by technical names - * @param technicalNames The technical names - * @return The libraries - */ - @Transactional(readOnly = true) - public List findByTechnicalNameIn(List technicalNames) { - return libraryRepository.findByTechnicalNameIn(technicalNames); - } - /** * Get all libraries of a project * @param project The project @@ -109,7 +99,7 @@ public List getLibrariesByProject(Project project) { public List getLibraryTokensByProject(Project project) { return getLibrariesByProject(project) .stream() - .map(Library::getId) + .map(library -> library.getAsset().getId()) .map(IdUtils::encrypt) .collect(Collectors.toList()); }