dev #91

Merged
Thibaut merged 4 commits from dev into master 2026-01-02 14:06:10 +00:00
Showing only changes of commit 6d6324e1b4 - Show all commits

View File

@ -115,13 +115,15 @@ public class ResultService {
public Uni<ResultCategoryData> getCategory(String uuid, long poule, SecurityCtx securityCtx) { public Uni<ResultCategoryData> getCategory(String uuid, long poule, SecurityCtx securityCtx) {
return hasAccess(uuid, securityCtx).chain(r -> return hasAccess(uuid, securityCtx).chain(r ->
matchRepository.list("category.compet.uuid = ?1 AND category.id = ?2", uuid, poule) matchRepository.list("category.compet.uuid = ?1 AND category.id = ?2", uuid, poule)
.call(list -> Mutiny.fetch(list.get(0).getCategory().getTree())) .call(list -> list.isEmpty() ? Uni.createFrom().voidItem() :
Mutiny.fetch(list.get(0).getCategory().getTree()))
.map(list -> getData(list, r.getMembre()))); .map(list -> getData(list, r.getMembre())));
} }
public Uni<ResultCategoryData> getCategory(String uuid, long poule) { public Uni<ResultCategoryData> getCategory(String uuid, long poule) {
return matchRepository.list("category.compet.uuid = ?1 AND category.id = ?2", uuid, poule) return matchRepository.list("category.compet.uuid = ?1 AND category.id = ?2", uuid, poule)
.call(list -> Mutiny.fetch(list.get(0).getCategory().getTree())) .call(list -> list.isEmpty() ? Uni.createFrom().voidItem() :
Mutiny.fetch(list.get(0).getCategory().getTree()))
.map(list -> getData(list, null)); .map(list -> getData(list, null));
} }