map routers gemaakt met router files in, backend/src/app.ts bevat verwijzingen naar deze files met app.use
This commit is contained in:
parent
c07bb959cf
commit
f45a9aa5a5
9 changed files with 112 additions and 0 deletions
25
backend/src/routes/student.ts
Normal file
25
backend/src/routes/student.ts
Normal file
|
@ -0,0 +1,25 @@
|
|||
import express from 'express'
|
||||
const router = express.Router();
|
||||
|
||||
// the list of classes a student is in
|
||||
router.get('/:id/classes', (req, res) => {
|
||||
res.send('classes');
|
||||
})
|
||||
|
||||
// the list of submissions a student has made
|
||||
router.get('/:id/submissions', (req, res) => {
|
||||
res.send('submissions');
|
||||
})
|
||||
|
||||
|
||||
// the list of assignments a student has
|
||||
router.get('/:id/assignments', (req, res) => {
|
||||
res.send('assignments');
|
||||
})
|
||||
|
||||
// the list of groups a student is in
|
||||
router.get('/:id/group', (req, res) => {
|
||||
res.send('groups');
|
||||
})
|
||||
|
||||
export default router
|
Loading…
Add table
Add a link
Reference in a new issue