Compare View
Commits (2)
Changes
Showing 3 changed files Side-by-side Diff
api-server/router-locations.js
... | ... | @@ -33,22 +33,9 @@ function pageAdd(req, res) { |
33 | 33 | } |
34 | 34 | |
35 | 35 | if (typeof locations === 'string') { |
36 | - locations = locations.trim().split(/[\s,]+/); | |
37 | - } | |
38 | - | |
39 | - if (locations.map((el) => { return el.toUpperCase(); }).indexOf('ALL') >= 0) { | |
40 | - config.locations = []; | |
41 | - matrix.config_is_dirty = true; | |
42 | - res.json({ | |
43 | - method: '/locations/add', | |
44 | - error: null, | |
45 | - new_location: locations, | |
46 | - locations: config.locations | |
47 | - }); | |
48 | - return; | |
36 | + locations = locations.trim().split(/[\s,]+/).map((el) => { return el.toUpperCase() !== 'ALL'; }); | |
49 | 37 | } |
50 | 38 | |
51 | - | |
52 | 39 | const locationsCount = locations.length; |
53 | 40 | for (let i=0; i<locationsCount; i++) { |
54 | 41 | const location = locations[i]; |
package-lock.json