Prepare for deployment

This commit is contained in:
2025-01-03 10:25:04 +01:00
parent d26f3dd3bf
commit 726c83dbbb
4 changed files with 45 additions and 5 deletions
+2 -2
View File
@@ -116,7 +116,7 @@
console.log(`Submitting dates for ${submitName.value}`)
console.log(JSON.stringify(choices))
const url = "http://localhost:8080/api/submit";
const url = "/api/submit";
fetch(url, {
method: "POST", // Specify the HTTP method
@@ -136,7 +136,7 @@
submitBtn.remove()
submitNameLabel.remove()
const textNode = document.createTextNode("Choices submitted. Thx.");
const textNode = document.createTextNode("This is some text added to the body.");
document.body.appendChild(textNode);
})
.catch(error => {
+2 -2
View File
@@ -118,7 +118,7 @@
tooltip.style.color = "white";
tooltip.style.borderRadius = "4px";
tooltip.style.fontSize = "12px";
tooltip.style.visibility = "visible";
tooltip.style.visibility = "hidden";
tooltip.style.whiteSpace = "nowrap";
tooltip.style.zIndex = "1000";
document.body.appendChild(tooltip);
@@ -151,7 +151,7 @@
}
}
const url = "http://localhost:8080/api/result/{{ .PollId }}"
const url = "/api/result/{{ .PollId }}"
fetch(url, {method: "GET"})
.then(response => {