From 9247b301a57acc616955a1d09e0b8262df850710 Mon Sep 17 00:00:00 2001 From: Bram Prieshof Date: Sat, 4 Apr 2026 23:43:04 +0200 Subject: [PATCH] Fixed stock status display on change api The visual state did not show the actual status, the hidden one for ChangeDetection did work correctly --- server.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index ed013c1..552af7c 100644 --- a/server.js +++ b/server.js @@ -100,8 +100,10 @@ app.get("/api/change", async (req, res) => { if( quantity > 0 ) { inStock = "InStock" ; + visualInStock = "In stock" ; } else{ inStock = "OutOfStock" ; + visualStock = "Out of stock" ; } res.send(` @@ -112,7 +114,7 @@ app.get("/api/change", async (req, res) => { }

${product}

-

Status: ${inStock ? "In Stock" : "Out of Stock"}

+

Status: ${visualStock}