feat: add licence detail to add log
This commit is contained in:
@@ -107,7 +107,7 @@ public class LicenceService {
|
|||||||
return Panache.withTransaction(() -> repository.persist(model));
|
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) {
|
if (form.getId() == -1) {
|
||||||
return combRepository.findById(id).chain(membreModel -> {
|
return combRepository.findById(id).chain(membreModel -> {
|
||||||
LicenceModel model = new LicenceModel();
|
LicenceModel model = new LicenceModel();
|
||||||
@@ -122,7 +122,9 @@ public class LicenceService {
|
|||||||
.call(genLicenceNumberAndAccountIfNeed())
|
.call(genLicenceNumberAndAccountIfNeed())
|
||||||
: Uni.createFrom().nullItem()
|
: 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));
|
licenceModel));
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user