diff --git a/server/application-server/src/main/java/de/tum/in/www1/hephaestus/meta/MetaService.java b/server/application-server/src/main/java/de/tum/in/www1/hephaestus/meta/MetaService.java index 24c0b310..766765cd 100644 --- a/server/application-server/src/main/java/de/tum/in/www1/hephaestus/meta/MetaService.java +++ b/server/application-server/src/main/java/de/tum/in/www1/hephaestus/meta/MetaService.java @@ -2,18 +2,21 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Value; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import de.tum.in.www1.hephaestus.admin.AdminService; + @Service public class MetaService { private static final Logger logger = LoggerFactory.getLogger(MetaService.class); - @Value("${monitoring.repositories}") - private String[] repositoriesToMonitor; + @Autowired + private AdminService adminService; public MetaDataDTO getMetaData() { logger.info("Getting meta data..."); - return new MetaDataDTO(repositoriesToMonitor); + return new MetaDataDTO( + adminService.getAdminConfig().getRepositoriesToMonitor().stream().sorted().toArray(String[]::new)); } }