[object Object]

← back to Linenwallpaper

Remove dead pass-12 leftovers from server.js (unused PRODUCTS_ORIG, pointless global, stale comment)

290b077fcebc3f822110d3192077f5f2ac87ce06 · 2026-05-18 20:30:47 -0700 · Steve Abrams

Files touched

Diff

commit 290b077fcebc3f822110d3192077f5f2ac87ce06
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Mon May 18 20:30:47 2026 -0700

    Remove dead pass-12 leftovers from server.js (unused PRODUCTS_ORIG, pointless global, stale comment)
---
 server.js | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/server.js b/server.js
index 3f5d9f1..56f98cd 100644
--- a/server.js
+++ b/server.js
@@ -48,10 +48,7 @@ function nicheFit(p) {
 const PRODUCTS_NICHE = PRODUCTS.filter(nicheFit);
 const NICHE_DROPPED = PRODUCTS.length - PRODUCTS_NICHE.length;
 console.log(`Niche filter: kept ${PRODUCTS_NICHE.length} of ${PRODUCTS.length}, dropped ${NICHE_DROPPED}`);
-// Replace PRODUCTS reference with the niche-filtered list for all downstream handlers.
-const PRODUCTS_ORIG = PRODUCTS;
-Object.defineProperty(global, '__products_niche_applied', { value: true });
-
+// PRODUCTS_NICHE is the niche-filtered list used by all downstream handlers.
 
 const app = express();
 // Security headers via helmet (added 2026-05-04 overnight YOLO loop)
@@ -155,7 +152,6 @@ app.get('/api/products', (req, res) => {
   const lim = Math.min(60, parseInt(limit) || 24);
   const start = (pageNum - 1) * lim;
   res.json({ total, page: pageNum, limit: lim, pages: Math.ceil(total/lim), sort, items: list.slice(start, start + lim) });
-  // (replaced) old: pages: Math.ceil(total / lim), items: list.slice(start, start + lim) });
 });
 
 app.get('/api/sliders', (req, res) => {

← 5ac29df hero-4grid: relocate json from data/ to public/ for Express  ·  back to Linenwallpaper  ·  Untrack 19 stale backup files from git and broaden .gitignor 6b04d01 →