summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/index.html2
-rw-r--r--web/index.js (renamed from web/script.js)6
2 files changed, 5 insertions, 3 deletions
diff --git a/web/index.html b/web/index.html
index f927d39..0fa0cea 100644
--- a/web/index.html
+++ b/web/index.html
@@ -47,6 +47,6 @@
47 </dialog> 47 </dialog>
48 48
49 <script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/leaflet.js" integrity="sha512-BwHfrr4c9kmRkLw6iXFdzcdWV/PGkVgiIyIWLLlTSXzWQzxuSg4DiQUCpauz/EWjgk5TYQqX/kvn9pG1NpYfqg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> 49 <script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/leaflet.js" integrity="sha512-BwHfrr4c9kmRkLw6iXFdzcdWV/PGkVgiIyIWLLlTSXzWQzxuSg4DiQUCpauz/EWjgk5TYQqX/kvn9pG1NpYfqg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
50 <script src="script.js"></script> 50 <script src="index.js"></script>
51 </body> 51 </body>
52</html> 52</html>
diff --git a/web/script.js b/web/index.js
index b3179b3..316e73f 100644
--- a/web/script.js
+++ b/web/index.js
@@ -1,3 +1,5 @@
1const apiBaseUrl = "https://api.routemon.fautchen.eu";
2
1const dialog = document.querySelector("dialog"); 3const dialog = document.querySelector("dialog");
2const closeButton = document.querySelector("dialog button"); 4const closeButton = document.querySelector("dialog button");
3closeButton.addEventListener("click", () => { 5closeButton.addEventListener("click", () => {
@@ -73,7 +75,7 @@ async function showProblem(rsp) {
73} 75}
74 76
75async function getSysinfo() { 77async function getSysinfo() {
76 const rsp = await fetch("http://localhost:8284/sysinfo", { 78 const rsp = await fetch(apiBaseUrl + "/sysinfo", {
77 method: "GET", 79 method: "GET",
78 headers: { 80 headers: {
79 "Accept-Language": "nl-NL", 81 "Accept-Language": "nl-NL",
@@ -89,7 +91,7 @@ async function getSysinfo() {
89} 91}
90 92
91async function load(gpxFile) { 93async function load(gpxFile) {
92 const rsp = await fetch("http://localhost:8284/gpx", { 94 const rsp = await fetch(apiBaseUrl + "/gpx", {
93 method: "POST", 95 method: "POST",
94 headers: { 96 headers: {
95 "Accept-Language": "nl-NL", 97 "Accept-Language": "nl-NL",