← back to 1920swallpaper
fix: /api/facets total counts niche-filtered list, not raw catalog
c57ed2b5a9dae08a525cf72f6730493cc79fa15e · 2026-05-19 08:22:17 -0700 · SteveStudio2
total used PRODUCTS.length (113) while the API actually serves
PRODUCTS_NICHE — facet counts and total were inconsistent.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Files touched
Diff
commit c57ed2b5a9dae08a525cf72f6730493cc79fa15e
Author: SteveStudio2 <steve@designerwallcoverings.com>
Date: Tue May 19 08:22:17 2026 -0700
fix: /api/facets total counts niche-filtered list, not raw catalog
total used PRODUCTS.length (113) while the API actually serves
PRODUCTS_NICHE — facet counts and total were inconsistent.
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 520488f..73c6a0e 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 }));
← 81662dd fix: wire sort select to server — send sort param + hydrate
·
back to 1920swallpaper
·
chore: untrack .bak/.pre- snapshot files + 404-guard against 48127d8 →