feat: add licence log

This commit is contained in:
2025-08-13 22:29:49 +02:00
parent 0563c7c8de
commit 0a56f8c180
3 changed files with 48 additions and 14 deletions

View File

@@ -55,6 +55,9 @@ public class AffiliationService {
@Inject
ReactiveMailer reactiveMailer;
@Inject
LoggerService ls;
@ConfigProperty(name = "upload_dir")
String media;
@@ -263,7 +266,9 @@ public class AffiliationService {
.call(l1 -> l1 != null && l1.stream().anyMatch(l -> l.getSaison() == saison) ?
Uni.createFrom().nullItem() :
Panache.withTransaction(() -> licenceRepository.persist(
new LicenceModel(null, m, club.getId(), saison, null, true, false)))));
new LicenceModel(null, m, club.getId(), saison, null, true, false)))
.call(licenceModel -> ls.logA(LogModel.ActionType.ADD, m.getObjectName(),
licenceModel))));
}
public Uni<?> accept(AffiliationRequestSaveForm form) {