From dc8c2a2de4381d83e0fe2208f02ed3e45783cf89 Mon Sep 17 00:00:00 2001 From: durn Date: Thu, 9 Apr 2026 16:20:30 -0600 Subject: [PATCH] quantity should be number NOT A STRING --- demo/src/main/resources/templates/create-recipe.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/demo/src/main/resources/templates/create-recipe.html b/demo/src/main/resources/templates/create-recipe.html index 4609977..4105d91 100644 --- a/demo/src/main/resources/templates/create-recipe.html +++ b/demo/src/main/resources/templates/create-recipe.html @@ -152,11 +152,12 @@ function renumberSteps() { // Call this wherever you build your POST payload: function getIngredients() { return [...ingredientContainer.querySelectorAll('.dynamic-row')].map(row => { + qtyValue = row.querySelector('.ing-qty').value.trim(); // quantity should be a number NOT A STRING return { ingredient: { name: row.querySelector('.ing-name').value.trim() }, - quantity: row.querySelector('.ing-qty').value.trim(), + quantity: Number(qtyValue), unit: row.querySelector('.ing-unit').value.trim(), notes: row.querySelector('.ing-notes').value.trim() };