Merge branch 'master' into testing

This commit is contained in:
simon 2023-02-11 17:29:09 +07:00
commit 0658424b94
1 changed files with 3 additions and 7 deletions

View File

@ -28,16 +28,12 @@ function checkMessages() {
// get messages for page on timer
function getMessages(dataOrigin) {
fetch('/progress/')
.then(response => {
return response.json();
})
.then(response => response.json())
.then(responseData => {
let messages = buildMessage(responseData, dataOrigin);
const messages = buildMessage(responseData, dataOrigin);
if (messages.length > 0) {
// restart itself
setTimeout(function () {
getMessages(dataOrigin);
}, 3000);
setTimeout(() => getMessages(dataOrigin), 500);
}
});
}