Added json settings

This commit is contained in:
2022-02-01 23:54:52 +01:00
parent 51c7738b12
commit 9a4fcee3dd
3 changed files with 60 additions and 3 deletions

View File

@ -53,6 +53,9 @@ router.get('/alerts/dates', function(req, res, next) {
});
var task = cron.schedule('* * * * *', () => {
if(globe.getSettigns().timer.refreshTimer === 1) {
wss.broadcast("new data is da")
}
const TEN_MINUTES = globe.getSettigns().timer.del*60*1000;
const date = new Date();
alerts.getAlertDates().forEach(ad => {
@ -79,7 +82,9 @@ router.post('/ws', async function(req, res, next) {
if (typeof src !== 'undefined' || typeof dest !== 'undefined')
await globe.addArc(src, dest, uid, item.srv_name, item.cli_name)
}
wss.broadcast("new data is da")
if(globe.getSettigns().timer.refreshTimer === 0) {
wss.broadcast("new data is da")
}
res.sendStatus(200);
})