diff --git a/backend/src/routes/teacher.ts b/backend/src/routes/teacher.ts new file mode 100644 index 00000000..a004ce8c --- /dev/null +++ b/backend/src/routes/teacher.ts @@ -0,0 +1,44 @@ +import express from 'express' +const router = express.Router(); + +// information about an question with id 'id' +router.get('/:id/', (req, res) => { + res.json({ + id: req.params.id, + firstName: 'John', + lastName: 'Doe', + username: 'JohnDoe1', + endpoints: { + classes: `/teacher/${req.params.id}/classes`, + questions: `/teacher/${req.params.id}/questions`, + invitations: `/teacher/${req.params.id}/invitations`, + }, + }); +}) + +router.get('/:id/questions', (req, res) => { + res.json({ + questions: [ + '0' + ], + }); +}); + +router.get('/:id/invitations', (req, res) => { + res.json({ + invitations: [ + '0' + ], + }); +}); + +router.get('/:id/classes', (req, res) => { + res.json({ + classes: [ + '0' + ], + }); +}); + + +export default router \ No newline at end of file