Commit 20034ed7d4753a70065afedb7363843deea01e97
1 parent
2135157663
Exists in
master
sort products after edit
Showing 1 changed file with 5 additions and 0 deletions Side-by-side Diff
index.js
... | ... | @@ -85,6 +85,11 @@ function submitConfigEdit(req, res) { |
85 | 85 | var sha256sum = crypto.createHash('sha256'); |
86 | 86 | sha256sum.update(req.body.newValue); |
87 | 87 | req.body.newValue = sha256sum.digest('hex'); |
88 | + | |
89 | + } else if (req.scope == 'globals' && req.keyword == 'products' && req.body.newValue.trim()) { | |
90 | + var products = req.body.newValue.split(','); | |
91 | + products = aaa.sortProductsArray(products); | |
92 | + req.body.newValue = products.join(','); | |
88 | 93 | } |
89 | 94 | |
90 | 95 | if (config[req.body.scope][req.body.keyword] != req.body.newValue.trim()) { |