From 4f64a60cb056378ea246233ec18230dbe08ec33e Mon Sep 17 00:00:00 2001 From: Rudi Regentonne <116655346+Rudi-Regentonne@users.noreply.github.com> Date: Wed, 7 May 2025 16:08:36 +0200 Subject: [PATCH] Update server.ts --- code/backend/src/server.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/backend/src/server.ts b/code/backend/src/server.ts index aae87f4..8cb4288 100644 --- a/code/backend/src/server.ts +++ b/code/backend/src/server.ts @@ -10,7 +10,7 @@ const app = express(); const port = 3000; type User = { id: string; - name: string; + username: string; email: string; password: string; } @@ -30,7 +30,7 @@ app.get('/', async (req: Request, res: Response) => { const users = await prisma.user.findMany(); // Namen extrahieren - const names = users.map((user:User) => user.name); + const names = users.map((user:User) => user.username); // Antwort zurück an den Client res.send(`There are ${users.length} users: ${names.join(', ')}`);