Automatic refresh after change of settings

routes/api.js
   - check error on return from server

public/javascripts/global.js
   -  reload pages with new values after save at settings

public/javascripts/map.js
   - removed status.loaded=true after call to laodAll

public/javascripts/showcharts.js
   - also load live at loadAll
This commit is contained in:
rxf
2023-04-07 18:09:24 +02:00
parent 22a6b9ab2c
commit abc05f177b
4 changed files with 11 additions and 21 deletions
+4
View File
@@ -32,6 +32,10 @@ router.get('/:cmd', async function(req, res, next) {
if (response.status !== 200) {
res.json({err: `Error from servercall: status = ${response.status}`})
}
if(response.data.err) {
res.json(response.data)
return
}
const options = response.data.options
for(let x of disttable) {
if (x.type === options.data) {