Skip to content
Snippets Groups Projects

fix(sitemap): fetch only UNIGE contributors (having a cnIndividu)

Merged Nicolas.Rod requested to merge rodn-fix-contributor-sitemap into master
Files
2
@@ -67,13 +67,11 @@ public class ContributorSitemapService extends SolidifySitemapService {
int page = from / this.getPageSize();
Pageable pageable = PageRequest.of(page, this.getPageSize(), Sort.by(AouConstants.DB_CN_INDIVIDU));
RestCollection<Contributor> result = this.getContributors(pageable);
return result.getData().stream()
.filter(p -> p.getCnIndividu() != null)
.map(p -> this.getItemPartialUrl(p.getCnIndividu())).toList();
return result.getData().stream().map(p -> this.getItemPartialUrl(p.getCnIndividu())).toList();
}
private RestCollection<Contributor> getContributors(Pageable pageable) {
return this.remoteContributorService.findAll(pageable);
return this.remoteContributorService.listUnigeContributors(pageable);
}
}
Loading