add list user and part of user page

This commit is contained in:
2024-01-22 22:52:23 +01:00
parent 21cb673d33
commit 6f590cdaf7
44 changed files with 1469 additions and 186 deletions

View File

@@ -0,0 +1,28 @@
package fr.titionfire.ffsaf.rest;
import fr.titionfire.ffsaf.domain.service.ClubService;
import fr.titionfire.ffsaf.net2.data.SimpleClubModel;
import io.smallrye.mutiny.Uni;
import jakarta.annotation.security.RolesAllowed;
import jakarta.inject.Inject;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.MediaType;
import java.util.List;
@Path("/club")
public class ClubEndpoints {
@Inject
ClubService clubService;
@GET
@Path("/no_detail")
@RolesAllowed("federation_admin")
@Produces(MediaType.APPLICATION_JSON)
public Uni<List<SimpleClubModel>> getAll() {
return clubService.getAll().map(clubModels -> clubModels.stream().map(SimpleClubModel::fromModel).toList());
}
}