feat: refacto update membre
wip: Logger
This commit is contained in:
@@ -30,7 +30,6 @@ public class LoggerService {
|
||||
private final List<LogModel> buffer = new ArrayList<>();
|
||||
|
||||
public Uni<?> logA(ActionType action, ObjectType object, String message, String target_name, Long target_id) {
|
||||
System.out.println("log");
|
||||
return Panache.withTransaction(() -> repository.persist(
|
||||
new LogModel(null, securityCtx.getSubject(), new Date(), action, object, target_id, target_name,
|
||||
message)));
|
||||
@@ -49,7 +48,6 @@ public class LoggerService {
|
||||
}
|
||||
|
||||
public Uni<?> logAChange(String champ, Object o1, Object o2, LoggableModel model) {
|
||||
System.out.println(o1 + " " + o2);
|
||||
if (Objects.equals(o1, o2))
|
||||
return Uni.createFrom().nullItem();
|
||||
return logA(ActionType.UPDATE, champ + ": " + o1.toString() + " -> " + o2.toString(), model);
|
||||
@@ -69,7 +67,6 @@ public class LoggerService {
|
||||
}
|
||||
|
||||
public void log(ActionType action, ObjectType object, String message, String target_name, Long target_id) {
|
||||
System.out.println("log");
|
||||
buffer.add(new LogModel(null, securityCtx.getSubject(), new Date(), action, object, target_id, target_name,
|
||||
message));
|
||||
}
|
||||
@@ -87,7 +84,6 @@ public class LoggerService {
|
||||
}
|
||||
|
||||
public void logChange(String champ, Object o1, Object o2, LoggableModel model) {
|
||||
System.out.println(o1 + " " + o2);
|
||||
if (Objects.equals(o1, o2))
|
||||
return;
|
||||
log(ActionType.UPDATE, champ + ": " + o1.toString() + " -> " + o2.toString(), model);
|
||||
|
||||
Reference in New Issue
Block a user