feat: add reject reason for affiliationRequest
This commit is contained in:
@@ -102,12 +102,12 @@ public class AffiliationRequestEndpoints {
|
||||
@APIResponse(responseCode = "404", description = "Demande d'affiliation non trouvée")
|
||||
})
|
||||
public Uni<?> getDelAffRequest(
|
||||
@Parameter(description = "L'identifiant de la demande d'affiliation") @PathParam("id") long id) {
|
||||
@Parameter(description = "L'identifiant de la demande d'affiliation") @PathParam("id") long id, @QueryParam("reason") String reason) {
|
||||
return service.getRequest(id).invoke(Unchecked.consumer(o -> {
|
||||
if (o.getClub() == null && !securityCtx.roleHas("federation_admin"))
|
||||
throw new DForbiddenException();
|
||||
})).invoke(o -> checkPerm.accept(o.getClub()))
|
||||
.chain(o -> service.deleteReqAffiliation(id));
|
||||
.chain(o -> service.deleteReqAffiliation(id, reason));
|
||||
}
|
||||
|
||||
@PUT
|
||||
|
||||
Reference in New Issue
Block a user