feat: add licence detail to add log

This commit is contained in:
2026-08-06 15:03:03 +02:00
parent 931c5076b7
commit 81f6169d41

View File

@@ -107,7 +107,7 @@ public class LicenceService {
return Panache.withTransaction(() -> repository.persist(model));
}
public Uni<LicenceModel> setLicence(long id, LicenceForm form) { // TODO add log
public Uni<LicenceModel> setLicence(long id, LicenceForm form) {
if (form.getId() == -1) {
return combRepository.findById(id).chain(membreModel -> {
LicenceModel model = new LicenceModel();
@@ -122,7 +122,9 @@ public class LicenceService {
.call(genLicenceNumberAndAccountIfNeed())
: Uni.createFrom().nullItem()
))
.call(licenceModel -> ls.logA(LogModel.ActionType.ADD, membreModel.getObjectName(),
.call(licenceModel -> ls.logA(LogModel.ActionType.ADD,
"%s (valid=%b, pay=%b, %s)" .formatted(membreModel.getObjectName(), model.isValidate(),
model.isPay(), model.getCertificate()),
licenceModel));
});
} else {