Refresh function for main frontend, separate main frontends for normal countdown and score+countdown
This commit is contained in:
@@ -30,10 +30,11 @@ function updateFrontend(values) {
|
||||
}
|
||||
|
||||
async function initialUpdate() {
|
||||
const response = await fetch("/admin/timerGetValues"); // Call API Endpoint /admin/timerGetValues
|
||||
const data = await response.json(); // Wait for asyncronous transfer to complete and parse json (which got received by backend)
|
||||
console.log(data); // Print received data
|
||||
updateFrontend(data); // Update admin frontend with received values
|
||||
// Request monitor refresh for index frontend
|
||||
async function refreshMonitor() {
|
||||
const response = await fetch("/admin/refreshMonitor"); // Call API Endpoint /admin/timerStart
|
||||
const data = await response.json(); // Wait for asyncronous transfer to complete and parse json (which got received by backend)
|
||||
console.log("Send request to refresh the monitor");
|
||||
}
|
||||
|
||||
// Timerfunctions
|
||||
|
||||
Reference in New Issue
Block a user