[object Object]

← back to Hospitalitywallcoverings

/api/facets total now reflects filtered (niche) list, not raw PRODUCTS

1373dbd386df7843a9db1d3cc50f379adc9ba0b3 · 2026-05-25 21:11:58 -0700 · Steve Abrams

Files touched

Diff

commit 1373dbd386df7843a9db1d3cc50f379adc9ba0b3
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Mon May 25 21:11:58 2026 -0700

    /api/facets total now reflects filtered (niche) list, not raw PRODUCTS
---
 server.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server.js b/server.js
index 60ab78c..91f70de 100644
--- a/server.js
+++ b/server.js
@@ -196,7 +196,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 });
 });
 
 // Hospitality-grade facet counts — drives the front-page filter chips.

← b52f48c wire api-vendor-redact middleware — strips vendor field and  ·  back to Hospitalitywallcoverings  ·  add clean-URL route for /about (redirects to home until abou 7e71892 →