private Object prepareAndSendRestAudit()

in src/main/java/com/epam/digital/data/platform/excerpt/api/audit/ControllerAuditAspect.java [137:152]


  private Object prepareAndSendRestAudit(ProceedingJoinPoint joinPoint, String action, UUID id) throws Throwable {

    String methodName = joinPoint.getSignature().getName();

    restAuditEventsFacade
        .sendRestAudit(EventType.USER_ACTION, methodName, action, BEFORE, id, null);

    Object result = joinPoint.proceed();

    var resultStatus = ((ResponseEntity<?>) result).getStatusCode().getReasonPhrase();

    restAuditEventsFacade.sendRestAudit(EventType.USER_ACTION, methodName,
        action, AFTER, id, resultStatus);

    return result;
  }