fix: integratie user + errors gefixt zodat het runt + format

This commit is contained in:
Gabriellvl 2025-03-09 23:59:31 +01:00
parent 6c4ea0eefb
commit 1b096b411b
55 changed files with 858 additions and 594 deletions

View file

@ -1,38 +1,34 @@
import express from 'express'
import express from 'express';
const router = express.Router();
// root endpoint used to search objects
// Root endpoint used to search objects
router.get('/', (req, res) => {
res.json({
questions: [
'0',
'1',
]
questions: ['0', '1'],
});
});
// information about an question with id 'id'
// Information about an question with id 'id'
router.get('/:id', (req, res) => {
res.json({
id: req.params.id,
student: '0',
group: '0',
time: new Date(2025, 1, 1),
content: 'Zijn alle gehele getallen groter dan 2 gelijk aan de som van 2 priemgetallen????',
content:
'Zijn alle gehele getallen groter dan 2 gelijk aan de som van 2 priemgetallen????',
learningObject: '0',
links: {
self: `${req.baseUrl}/${req.params.id}`,
answers: `${req.baseUrl}/${req.params.id}/answers`,
}
},
});
})
});
router.get('/:id/answers', (req, res) => {
res.json({
answers: [
'0'
],
})
})
answers: ['0'],
});
});
export default router
export default router;