[object Object]

← back to Museumwallpaper

Fix /api/facets total to count niche-filtered products served

3802fabccdb194827193e3e08b7cca106715b867 · 2026-05-19 08:04:37 -0700 · Steve Abrams

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

Files touched

Diff

commit 3802fabccdb194827193e3e08b7cca106715b867
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Tue May 19 08:04:37 2026 -0700

    Fix /api/facets total to count niche-filtered products served
    
    Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---
 server.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server.js b/server.js
index be5043e..45dacf7 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 }));

← 567fa5d Wire sort select to API and hydrate saved sort before first  ·  back to Museumwallpaper  ·  Untrack backup snapshots, broaden .gitignore, add static .ba de5ee39 →