feat: secure match ans poule endpoints

This commit is contained in:
2024-08-15 13:56:54 +02:00
parent bd386d1b0a
commit 6b38405e94
7 changed files with 82 additions and 61 deletions

View File

@@ -274,7 +274,6 @@ public class ClubEndpoints {
@GET
@Path("{clubId}/logo")
@RolesAllowed({"federation_admin", "club_president", "club_secretaire", "club_respo_intra"})
@Operation(summary = "Renvoie le logo du club", description = "Renvoie le logo du club spécifié")
@APIResponses(value = {
@APIResponse(responseCode = "200", description = "Le logo du club"),
@@ -284,7 +283,7 @@ public class ClubEndpoints {
})
public Uni<Response> getLogo(
@Parameter(description = "Identifiant long (clubId) de club") @PathParam("clubId") String clubId) {
return clubService.getByClubId(clubId).onItem().invoke(checkPerm).chain(Unchecked.function(clubModel -> {
return clubService.getByClubId(clubId).chain(Unchecked.function(clubModel -> {
try {
return Utils.getMediaFile((clubModel != null) ? clubModel.getId() : -1, media, "ppClub",
Uni.createFrom().nullItem());