← back to Handcraftedwallpaper
fix /api/facets total — report niche-filtered product count, not pre-niche PRODUCTS.length
cc0c4d0b586075138391468be826140178ae3e48 · 2026-05-18 20:50:11 -0700 · Steve Abrams
Files touched
Diff
commit cc0c4d0b586075138391468be826140178ae3e48
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Mon May 18 20:50:11 2026 -0700
fix /api/facets total — report niche-filtered product 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 db41956..a7fd0e2 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 }));
← f1c5e32 fix sort select — loadGridPage now passes sort to /api/produ
·
back to Handcraftedwallpaper
·
add clean-URL routes for about/history/care/sourcing/trade — 2e99863 →