forked from ryanmwangi/CalMerger
remove refresh interval code from the client side
This commit is contained in:
parent
65520b70f2
commit
2ceb708452
16
script.js
16
script.js
|
@ -55,18 +55,4 @@ const form = document.getElementById('merge-form');
|
|||
console.error('Error:', error);
|
||||
result.innerHTML = `Error merging calendars: ${error.message}`
|
||||
});
|
||||
});
|
||||
|
||||
const refreshInterval = 60 * 60 * 1000; // 1 hour
|
||||
setInterval(() => {
|
||||
fetch('/merge')
|
||||
.then((response) => response.json())
|
||||
.then((data) => {
|
||||
result.innerHTML = `Merged calendar URL: <a href="${data.url}">${data.url}</a>`;
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error);
|
||||
result.innerHTML = 'Error merging calendars';
|
||||
});
|
||||
}, refreshInterval);
|
||||
|
||||
});
|
Loading…
Reference in New Issue