Commit 59cf14af13e2615821d3297ea4dfa87766e9c574
1 parent
438d7f4c16
Exists in
master
APISERVER: Fix missing identifier
Showing 1 changed file with 3 additions and 2 deletions Side-by-side Diff
api-server/router-products.js
... | ... | @@ -31,7 +31,8 @@ function pageAdd(req, res, next) { |
31 | 31 | return; |
32 | 32 | } |
33 | 33 | |
34 | - config.products.push(req.params.product.trim().toUpperCase()); | |
34 | + const product = req.params.product.trim().toUpperCase(); | |
35 | + config.products.push(product); | |
35 | 36 | config.products.map(function(x) { return x.toUpperCase(); }); |
36 | 37 | unique(config.products); |
37 | 38 | config.products.sort(naturalSort()); |
... | ... | @@ -40,7 +41,7 @@ function pageAdd(req, res, next) { |
40 | 41 | res.json({ |
41 | 42 | method: '/products/add', |
42 | 43 | error: null, |
43 | - new_product: newProduct, | |
44 | + new_product: product, | |
44 | 45 | products: config.products |
45 | 46 | }) |
46 | 47 | } |