[object Object]

← back to Micawallpaper

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

52896e9c8337ebbfeffce007e3a2acf43be33060 · 2026-05-18 20:46:23 -0700 · Steve Abrams

Files touched

Diff

commit 52896e9c8337ebbfeffce007e3a2acf43be33060
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Mon May 18 20:46:23 2026 -0700

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

diff --git a/server.js b/server.js
index 8b8d7f4..5f4cfe6 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 }));

← 05d51a9 fix sort: loadGridPage now passes state.sort to /api/product  ·  back to Micawallpaper  ·  add /about route + clean-URL routes for care/history/sourcin fb4d87b →