From 3b83905603d44b1a08f8b2b36a605808ce686ad6 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Tue, 02 Jun 2026 00:46:48 +0000
Subject: [PATCH] =double checking schema outputs for legacytattooremoval

---
 inc/rest/routes/FeedRoutes.php |   28 ++++++++++++++++++----------
 1 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/inc/rest/routes/FeedRoutes.php b/inc/rest/routes/FeedRoutes.php
index f1b6bb2..76f6b61 100644
--- a/inc/rest/routes/FeedRoutes.php
+++ b/inc/rest/routes/FeedRoutes.php
@@ -6,7 +6,7 @@
 use JVBase\rest\Rest;
 use JVBase\integrations\Umami;
 use JVBase\rest\Route;
-use JVBase\utility\Features;
+use JVBase\base\Site;
 use WP_Query;
 use WP_Post;
 use WP_Term;
@@ -44,7 +44,7 @@
 
 	public function init():void
 	{
-		if (Features::hasIntegration('umami')) {
+		if (Site::hasIntegration('umami')) {
 			$this->tracker = JVB()->connect('umami');
 		}
 	}
@@ -68,7 +68,7 @@
 				'dateFrom' => 'string',
 				'dateTo' => 'string',
 				'context' => 'string',
-				'source' => 'string',
+				'contextId' => 'string',
 				'favourites' => 'boolean',
 				'user' => 'integer',
 				'highlight' => 'string',
@@ -87,7 +87,7 @@
 				'dateFrom' => 'string',
 				'dateTo' => 'string',
 				'context' => 'string',
-				'source' => 'string',
+				'contextId' => 'string',
 				'favourites' => 'boolean',
 				'user' => 'integer',
 				'highlight' => 'string',
@@ -213,7 +213,7 @@
 						break;
 					case 'post':
 						$out['date'] = $post->post_date;
-						$out['modified'] = $post->post_modified;
+						$out['date_modified'] = $post->post_modified;
 						$out['user_id'] = (int)$post->post_author;
 						$out['url'] = get_the_permalink($postID);
 						$out['title']= get_the_title($postID);
@@ -281,7 +281,7 @@
 		$item['fields']['before'] = get_post_thumbnail_id($children[0]);
 		$item['fields']['after'] = get_post_thumbnail_id($children[array_key_last($children)]);
 
-		$item['fields']['timeline'] = $subFields;
+		$item['fields']['timeline_gallery'] = $subFields;
 		$item['images'] = $item['images'] + $images;
 
 
@@ -338,7 +338,7 @@
 	protected function getAuthorData(WP_Post $post)
 	{
 		$author = $post->post_author;
-		$userLink = get_user_meta($author, BASE.'link', true);
+		$userLink = get_user_meta($author, BASE.'profile_link', true);
 		return $this->cache->remember(
 			$userLink,
 			function () use ($userLink, $author) {
@@ -410,7 +410,7 @@
 			$args = $this->applyContextFilters(
 				$args,
 				[
-					'id' => $data['source']??'0',
+					'id' => $data['contextId']??'0',
 					'type' => $data['context']
 				]
 			);
@@ -537,8 +537,16 @@
 
 				// Add term to tax query
 				$args['tax_query'][] = [
-					'taxonomy' => jvbCheckBase($context['type']),
-					'field' => 'term_id',
+					'taxonomy' => $registrar->getBased(),
+//					'field' => 'term_id',
+					'terms' => [(int)$context['id']],
+				];
+				break;
+			case $registrar->getType() === 'term':
+				// Add term to tax query
+				$args['tax_query'][] = [
+					'taxonomy' => $registrar->getBased(),
+//					'field' => 'term_id',
 					'terms' => [(int)$context['id']],
 				];
 				break;

--
Gitblit v1.10.0