Flytta endepunkter inn i api/

This commit is contained in:
Trygve
2025-10-28 21:44:08 +01:00
parent 604fb365c6
commit 4cc7ff821c
14 changed files with 45 additions and 34 deletions

View File

@@ -23,7 +23,7 @@
</menu>
</nav>
<h2>Legg til løper</h2>
<form action="/runner.php" method="POST">
<form action="/api/runner.php" method="POST">
<input style="display: none;" type="text" id="password" name="password" required>
<label for="id">Startnummer:
@@ -60,7 +60,7 @@
// Sjekk om brukeren er logga inn. hvis ikke hiv de ut til innloggingskjermen
let xmlHttpReq = new XMLHttpRequest();
xmlHttpReq.open("POST", "/is_authorized.php", false);
xmlHttpReq.open("POST", "/api/is_authorized.php", false);
xmlHttpReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=UTF-8")
xmlHttpReq.send("username=" + localStorage.getItem("navn")+"&"+"password=" + localStorage.getItem("passord"));
if (xmlHttpReq.status != 200){