feat: improve result page design
This commit is contained in:
@@ -37,7 +37,7 @@ public class ExternalResultEndpoints {
|
||||
return Uni.createFrom().voidItem();
|
||||
|
||||
if (updateService.needUpdate(poule, rf)) {
|
||||
return resultService.getCategoryPublic(id, poule);
|
||||
return resultService.getCategory(id, poule);
|
||||
} else {
|
||||
return Uni.createFrom().voidItem();
|
||||
}
|
||||
@@ -67,7 +67,6 @@ public class ExternalResultEndpoints {
|
||||
}
|
||||
|
||||
|
||||
|
||||
@GET
|
||||
@Path("/club/list")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
@@ -81,6 +80,6 @@ public class ExternalResultEndpoints {
|
||||
public Uni<?> getClubArray(@QueryParam("club") long club) {
|
||||
if (club == 0)
|
||||
return Uni.createFrom().item("");
|
||||
return resultService.getClubArrayPublic(id, club);
|
||||
return resultService.getClubArray2(id, club, null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package fr.titionfire.ffsaf.rest;
|
||||
|
||||
import fr.titionfire.ffsaf.domain.service.ResultService;
|
||||
import fr.titionfire.ffsaf.rest.data.ResultCategoryData;
|
||||
import fr.titionfire.ffsaf.utils.ResultPrivacy;
|
||||
import fr.titionfire.ffsaf.utils.SecurityCtx;
|
||||
import io.quarkus.security.Authenticated;
|
||||
import io.smallrye.mutiny.Uni;
|
||||
@@ -10,6 +11,7 @@ import jakarta.ws.rs.GET;
|
||||
import jakarta.ws.rs.Path;
|
||||
import jakarta.ws.rs.PathParam;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@Authenticated
|
||||
@@ -29,17 +31,41 @@ public class ResultEndpoints {
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("{uuid}")
|
||||
public Uni<List<ResultCategoryData>> getCategory(@PathParam("uuid") String uuid) {
|
||||
return resultService.getCategory(uuid, securityCtx);
|
||||
@Path("{uuid}/category/list")
|
||||
public Uni<HashMap<String, Long>> getCategoryList(@PathParam("uuid") String uuid) {
|
||||
return resultService.getCategoryList(uuid);
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("{uuid}/club")
|
||||
public Uni<ResultService.ClubArrayData> getClub(@PathParam("uuid") String uuid) {
|
||||
return resultService.getClubArray(uuid, securityCtx);
|
||||
@Path("{uuid}/category/{id}")
|
||||
public Uni<ResultCategoryData> getCategory(@PathParam("uuid") String uuid, @PathParam("id") long id) {
|
||||
return resultService.getCategory(uuid, id, securityCtx);
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("{uuid}/club/list")
|
||||
public Uni<HashMap<String, Long>> getClubList(@PathParam("uuid") String uuid) {
|
||||
return resultService.getClubList(uuid);
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("{uuid}/club/{id}")
|
||||
public Uni<ResultService.ClubArrayData> getClub(@PathParam("uuid") String uuid, @PathParam("id") long id) {
|
||||
return resultService.getClubArray(uuid, id, securityCtx);
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("{uuid}/comb/list")
|
||||
public Uni<HashMap<String, String>> getCombList(@PathParam("uuid") String uuid) {
|
||||
return resultService.getCombList(uuid, ResultPrivacy.REGISTERED_ONLY);
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("{uuid}/comb/{id}")
|
||||
public Uni<?> getCombList(@PathParam("uuid") String uuid, @PathParam("id") String id) {
|
||||
return resultService.getCombArrayPublic(uuid, id, ResultPrivacy.REGISTERED_ONLY);
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("{uuid}/comb")
|
||||
public Uni<ResultService.CombsArrayData> getComb(@PathParam("uuid") String uuid) {
|
||||
|
||||
Reference in New Issue
Block a user