1
0
Fork 0

remove refresh interval code from the client side

This commit is contained in:
Ryan Mwangi 2024-10-21 15:22:43 +03:00
parent 65520b70f2
commit 2ceb708452
1 changed files with 1 additions and 15 deletions

View File

@ -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);
});