From a7d4868e63e012bf750395b5404769a55ca5a9a5 Mon Sep 17 00:00:00 2001 From: Adriaan Jacquet Date: Wed, 26 Feb 2025 14:40:32 +0100 Subject: [PATCH] feat: extra endpoints toegevoegd voor /assignment --- backend/src/routes/assignment.ts | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/backend/src/routes/assignment.ts b/backend/src/routes/assignment.ts index 95116243..38fffe29 100644 --- a/backend/src/routes/assignment.ts +++ b/backend/src/routes/assignment.ts @@ -9,8 +9,36 @@ router.get('/:id', (req, res) => { description: 'Een korte beschrijving', groups: [ '0' ], learningPath: '0', - class: '0' + class: '0', + links: { + self: `${req.baseUrl}/${req.params.id}`, + submissions: `${req.baseUrl}/${req.params.id}`, + }, }); }) +router.get('/:id/submissions', (req, res) => { + res.json({ + submissions: [ + '0' + ], + }); +}); + +router.get('/:id/groups', (req, res) => { + res.json({ + groups: [ + '0' + ], + }); +}); + +router.get('/:id/questions', (req, res) => { + res.json({ + questions: [ + '0' + ], + }); +}); + export default router \ No newline at end of file