elemente statt todos in dashboard
All checks were successful
Build & Push Image / build-image (push) Successful in 1m27s

This commit is contained in:
2026-03-02 18:57:22 +09:00
parent 8965ffc11b
commit 5569f35037
3 changed files with 6 additions and 6 deletions

View File

@@ -21,11 +21,11 @@ logoutBtn.addEventListener("click", () => {
});
// Lade Todos vom Backend
async function loadTodos() {
async function loadElements() {
try {
const res = await authFetch("/todos"); // fetchWrapper sendet den JWT Automatisch
const res = await authFetch("/elements"); // fetchWrapper sendet den JWT Automatisch
if (!res.ok) {
errorMessage.textContent = "Fehler beim Abrufen der Todos!";
errorMessage.textContent = "Fehler beim Abrufen der Elemente!";
if (res.status === 401) {
window.location.href = "login.html"; // bei ungültigem Token zum Login
}