[object Object]

← back to Healthcarewallpaper

fix /api/facets total to report niche-filtered count not pre-filter count

98aa5c0cbf855762821e293c19c7956bd064c488 · 2026-05-18 20:40:12 -0700 · Steve Abrams

Files touched

Diff

commit 98aa5c0cbf855762821e293c19c7956bd064c488
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Mon May 18 20:40:12 2026 -0700

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

diff --git a/server.js b/server.js
index c79b554..3649a7f 100644
--- a/server.js
+++ b/server.js
@@ -174,7 +174,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 }));

← 31bc6fb hero-4grid: relocate json from data/ to public/ for Express  ·  back to Healthcarewallpaper  ·  wire sort select to API: add state.sort + pass sort param in dfe8084 →