[object Object]

← back to Raffiawallcoverings

fix /api/facets total to count niche-filtered products so the displayed catalog count matches the grid

381e1cf16a4cb41843d52aebd9255d2970f57923 · 2026-05-18 20:36:44 -0700 · Steve Abrams

Files touched

Diff

commit 381e1cf16a4cb41843d52aebd9255d2970f57923
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Mon May 18 20:36:44 2026 -0700

    fix /api/facets total to count niche-filtered products so the displayed catalog count matches the grid
---
 server.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server.js b/server.js
index c70b513..4ac5d55 100644
--- a/server.js
+++ b/server.js
@@ -170,7 +170,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 }));

← 2fe5f79 add noreferrer to external Facebook link; drop dead niche-pa  ·  back to Raffiawallcoverings  ·  stage2: wire microsite catalog + admin CRUD + grid/list view 9b995d7 →