[object Object]

← back to Corkwallcovering

fix /api/facets total: report niche-filtered count, not raw

7d043abb15780ead69589bd408b921d65e37904d · 2026-05-25 20:57:03 -0700 · SteveStudio2

Files touched

Diff

commit 7d043abb15780ead69589bd408b921d65e37904d
Author: SteveStudio2 <steve@designerwallcoverings.com>
Date:   Mon May 25 20:57:03 2026 -0700

    fix /api/facets total: report niche-filtered count, not raw
---
 server.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server.js b/server.js
index 4fe4796..f65c26d 100644
--- a/server.js
+++ b/server.js
@@ -178,7 +178,7 @@ app.get('/api/facets', (req, res) => {
     aesthetics[p.aesthetic] = (aesthetics[p.aesthetic] || 0) + 1;
     vendors[p.vendor] = (vendors[p.vendor] || 0) + 1;
   }
-  res.json({ aesthetics, vendors, total: PRODUCTS.length });
+  res.json({ aesthetics, vendors, total: PRODUCTS_NICHE.length });
 });
 
 app.get('/api/health', (req, res) => res.json({ status: 'ok', count: PRODUCTS_NICHE.length, dropped: DROPPED }));

← d532ed7 retag aesthetic from PG: 257 rows updated  ·  back to Corkwallcovering  ·  add 404-guard middleware (JSON for /api/*, text otherwise) 99cc085 →