feat: club
This commit is contained in:
@@ -24,6 +24,7 @@ import org.eclipse.microprofile.config.inject.ConfigProperty;
|
||||
import org.eclipse.microprofile.jwt.JsonWebToken;
|
||||
|
||||
import java.net.URISyntaxException;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
@@ -57,6 +58,14 @@ public class ClubEndpoints {
|
||||
return clubService.getAll().map(clubModels -> clubModels.stream().map(SimpleClubModel::fromModel).toList());
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("/contact_type")
|
||||
@Authenticated
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public Uni<HashMap<String, String>> getConcatType() {
|
||||
return Uni.createFrom().item(Contact.toSite());
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("/find")
|
||||
@RolesAllowed({"federation_admin"})
|
||||
@@ -111,11 +120,12 @@ public class ClubEndpoints {
|
||||
});
|
||||
}
|
||||
|
||||
@POST
|
||||
@PUT
|
||||
@RolesAllowed({"federation_admin"})
|
||||
@Produces(MediaType.TEXT_PLAIN)
|
||||
@Consumes(MediaType.MULTIPART_FORM_DATA)
|
||||
public Uni<Long> addAdminClub(FullClubForm input) {
|
||||
System.out.println(input);
|
||||
return clubService.add(input)
|
||||
.invoke(Unchecked.consumer(id -> {
|
||||
if (id == null) throw new InternalError("Fail to create club data");
|
||||
|
||||
@@ -37,7 +37,7 @@ public class FullClubForm {
|
||||
private String rna = null;
|
||||
|
||||
@FormParam("siret")
|
||||
private Long siret = null;
|
||||
private String siret = null;
|
||||
|
||||
@FormParam("international")
|
||||
private boolean international = false;
|
||||
|
||||
Reference in New Issue
Block a user