From ccf5e61a075c35d24befc175994b5cb8957ca322 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Wed, 26 Aug 2026 21:45:53 +0000
Subject: [PATCH] =Extra JVB() calls replaced, minor tweaks

---
 inc/rest/routes/TermRoutes.php |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/inc/rest/routes/TermRoutes.php b/inc/rest/routes/TermRoutes.php
index 8178cad..38772cb 100644
--- a/inc/rest/routes/TermRoutes.php
+++ b/inc/rest/routes/TermRoutes.php
@@ -3,6 +3,7 @@
 
 use JVBase\Instance;
 use JVBase\managers\Cache;
+use JVBase\managers\Errors;
 use JVBase\managers\TaxonomyRelationships;
 use JVBase\registrar\Registrar;
 use JVBase\rest\Rest;
@@ -27,9 +28,7 @@
         $this->cacheName = 'terms';
         parent::__construct();
 		$this->cache = Cache::for('terms', 'term');
-		if (JVB_TESTING) {
-			$this->cache->flush();
-		}
+
 
         $this->per_page = 20;
 
@@ -559,7 +558,7 @@
 
 			$membership = Site::membership();
 			if ($membership && $membership->has('term_approval')) {
-				$approval_routes = JVB()->routes('approvals');
+				$approval_routes = ApprovalRoutes::getInstance();
 				$request_id = $approval_routes->createTermApprovalRequest(
 					$user_id,
 					$taxonomy,
@@ -602,7 +601,7 @@
 			], 201); // 201 Created
 
 		} catch (Exception $e) {
-			JVB()->error()->log(
+			Errors::getInstance()->log(
 				'terms',
 				'Term creation failed: ' . $e->getMessage(),
 				['user_id' => $user_id, 'taxonomy' => $taxonomy, 'name' => $name]

--
Gitblit v1.10.0