Commit b4fa4276 by Иван Кубота

fix

parent 51f0ad11
...@@ -141,8 +141,8 @@ ...@@ -141,8 +141,8 @@
hh1.style.display = 'none'; hh1.style.display = 'none';
hh2.style.display = 'block'; hh2.style.display = 'block';
var begin = 0; var begin = 0;
var f;
setInterval(function () { setInterval(f = function () {
fetch('http://vkusvill.flexlab.pro:4001/api/quiz/monitordata?start='+begin) fetch('http://vkusvill.flexlab.pro:4001/api/quiz/monitordata?start='+begin)
.then(response => response.json()) .then(response => response.json())
.then(data => { .then(data => {
...@@ -153,7 +153,8 @@ ...@@ -153,7 +153,8 @@
begin = data.date; begin = data.date;
}) })
} ); } );
},1000); },60000);
f()
let socket = new WebSocket('ws://'+location.hostname+':8080'); let socket = new WebSocket('ws://'+location.hostname+':8080');
......
...@@ -282,7 +282,7 @@ module.exports = { ...@@ -282,7 +282,7 @@ module.exports = {
}, },
summary: 'monitordata', summary: 'monitordata',
fn: async function(args, req, res){ fn: async function(args, req, res){
return log.logging.filter(l=>l.start>=args.start); return log.logging.filter(l=>l.start>args.start);
} }
} }
}; };
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment