From 3d25ad7de4fdbb3eba2cde2a62422e6be5d79a0a Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Tue, 25 Aug 2026 22:57:22 +0000
Subject: [PATCH] =It's been a minute. I went through the Routes and associated Managers and ensured they played together well. Reworked the Cache.php, and I think I caught all the references. Moving away from JVBase() root class, to individuall classes that are Instanced. Double checked for the ABSPATH check in every file, and added index.php to every directory that didn't already have it. Also still working on the MenuBlock to work with WooCommerce for now for Northeh

---
 inc/rest/Rest.php |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/inc/rest/Rest.php b/inc/rest/Rest.php
index 89f0343..4741e66 100644
--- a/inc/rest/Rest.php
+++ b/inc/rest/Rest.php
@@ -1,6 +1,8 @@
 <?php
 namespace JVBase\rest;
 
+use JVBase\Instance;
+use JVBase\integrations\services\Cloudflare;
 use JVBase\managers\Cache;
 use JVBase\meta\Meta;
 use JVBase\registrar\Registrar;
@@ -30,7 +32,7 @@
 	protected string $namespace = 'jvb/v1';
 	protected ?Cache $cache = null;
 	protected string $cacheName = '';
-	protected int $cacheTtl = 3600;
+	protected int $cacheTtl = HOUR_IN_SECONDS;
 	protected static ?string $action;
 
 	public function __construct()
@@ -180,7 +182,7 @@
 	/**
 	 * Convert MySQL datetime to ISO 8601 timestamp
 	 */
-	protected function formatTimestamp(?string $mysqlDatetime): ?string
+	public function formatTimestamp(?string $mysqlDatetime): ?string
 	{
 		return Response::formatTimestamp($mysqlDatetime);
 	}
@@ -555,11 +557,11 @@
 	 */
 	protected function verifyTurnstile(string $token): bool
 	{
-		if (!Site::hasIntegration('cloudflare') || !JVB()->connect('cloudflare')->isSetUp()) {
+		if (!Site::hasIntegration('cloudflare') || !Cloudflare::getInstance()->isSetUp()) {
 			return true;
 		}
 
-		return !empty($token) && JVB()->connect('cloudflare')->verifyTurnstile($token);
+		return !empty($token) && Cloudflare::getInstance()->verifyTurnstile($token);
 	}
 
 	/**

--
Gitblit v1.10.0