From 62d4e3bc224d4fe52fa3af8cc5f9d25dab055cab Mon Sep 17 00:00:00 2001 From: Adriaan Jacquet Date: Wed, 26 Feb 2025 14:20:58 +0100 Subject: [PATCH] feat: profiel endpoint van een student toegevoegd --- backend/src/routes/student.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/backend/src/routes/student.ts b/backend/src/routes/student.ts index 3c8cd16c..b799e6aa 100644 --- a/backend/src/routes/student.ts +++ b/backend/src/routes/student.ts @@ -1,6 +1,22 @@ import express from 'express' const router = express.Router(); +// information about a student's profile +router.get('/:id', (req, res) => { + res.json({ + id: req.params.id, + firstName: 'Jimmy', + lastName: 'Faster', + username: 'JimmyFaster2', + endpoints: { + classes: `/student/${req.params.id}/classes`, + questions: `/student/${req.params.id}/submissions`, + invitations: `/student/${req.params.id}/assignments`, + groups: `/student/${req.params.id}/groups`, + }, + }); +}); + // the list of classes a student is in router.get('/:id/classes', (req, res) => { res.json({