[object Object]

← back to Screenprintedwallpaper

fix /api/facets total to report niche-filtered count, not pre-niche PRODUCTS.length

85e14798d5b5dbfd4ec6948024dcd0831c160831 · 2026-05-18 20:52:51 -0700 · Steve Abrams

Files touched

Diff

commit 85e14798d5b5dbfd4ec6948024dcd0831c160831
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Mon May 18 20:52:51 2026 -0700

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

diff --git a/server.js b/server.js
index cae35df..5060737 100644
--- a/server.js
+++ b/server.js
@@ -120,7 +120,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 }));

← 53bab66 wire up product sort: server handles sort param, client send  ·  back to Screenprintedwallpaper  ·  add clean-URL routes for editorial pages, fixing the dead /a a8be562 →