diff --git a/public/dashboard.html b/public/dashboard.html
index 50e2070..d5ad6db 100644
--- a/public/dashboard.html
+++ b/public/dashboard.html
@@ -12,8 +12,8 @@
-
Todos
-
+ Elemente
+
diff --git a/public/dashboard.js b/public/dashboard.js
index df2bc08..6108dac 100644
--- a/public/dashboard.js
+++ b/public/dashboard.js
@@ -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
}
diff --git a/src/routes/elementRoutes.js b/src/routes/elementRoutes.js
index 0de9c2b..17c415f 100644
--- a/src/routes/elementRoutes.js
+++ b/src/routes/elementRoutes.js
@@ -3,7 +3,7 @@ import prisma from '../prismaClient.js'
const router = express.Router()
-router.get('/', async (req, res) => {
+router.get('/elements', async (req, res) => {
try {
// Versuche es mit exakt dem Namen aus deinem Schema (Elements)
const data = await prisma.Elements.findMany();