mirror of
https://github.com/bubblecup-12/VogelSocialMedia.git
synced 2025-07-06 15:18:48 +00:00
Update server.ts
This commit is contained in:
parent
85a059889b
commit
4f64a60cb0
1 changed files with 2 additions and 2 deletions
|
@ -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(', ')}`);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue