From a6413da67a4579866f0fd0323ddb23a7b6b9654a Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Fri, 18 Sep 2026 17:00:53 +0000
Subject: [PATCH] =Cleaning up the Integrations setup a bit, started the Helcim integration work too
---
inc/rest/Rest.php | 16 +++-------------
1 files changed, 3 insertions(+), 13 deletions(-)
diff --git a/inc/rest/Rest.php b/inc/rest/Rest.php
index cc2caef..81c6fcb 100644
--- a/inc/rest/Rest.php
+++ b/inc/rest/Rest.php
@@ -1,6 +1,7 @@
<?php
namespace JVBase\rest;
+use JVBase\inc\managers\ErrorHelper;
use JVBase\integrations\services\Cloudflare;
use JVBase\managers\Cache;
use JVBase\managers\Errors;
@@ -30,6 +31,7 @@
*/
abstract class Rest
{
+ use ErrorHelper;
protected string $namespace = 'jvb/v1';
protected ?Cache $cache = null;
protected string $cacheName = '';
@@ -645,24 +647,12 @@
]);
try {
- Errors::getInstance()->log('security_audit', $event, $context, 'info');
+ $this->logError($event,'auditLog', $context);
} catch (Exception $e) {
error_log("Security Audit: {$event} - " . json_encode($context));
}
}
- /**
- * Log errors with proper context
- */
- protected function logError(string $message, array $context = [], string $severity = 'error'): void
- {
- try {
- Errors::getInstance()->log(static::class, $message, $context, $severity);
- } catch (Exception $e) {
- error_log(static::class . " Error: {$message} - " . json_encode($context));
- }
- }
-
/************************************************************
SESSION FINGERPRINT
************************************************************/
--
Gitblit v1.10.0