fix: consistente naamgeving
This commit is contained in:
parent
037763a810
commit
3b71c80be6
11 changed files with 17 additions and 17 deletions
25
backend/src/routes/classes.ts
Normal file
25
backend/src/routes/classes.ts
Normal file
|
@ -0,0 +1,25 @@
|
|||
import express from 'express'
|
||||
import { getAllClassesHandler, getClassHandler, getClassStudentsHandler } from '../controllers/classes';
|
||||
import assignmentRouter from './assignments.js';
|
||||
|
||||
const router = express.Router();
|
||||
|
||||
// root endpoint used to search objects
|
||||
router.get('/', getAllClassesHandler);
|
||||
|
||||
// information about an class with id 'id'
|
||||
router.get('/:id', getClassHandler);
|
||||
|
||||
router.get('/:id/invitations', (req, res) => {
|
||||
res.json({
|
||||
invitations: [
|
||||
'0'
|
||||
],
|
||||
});
|
||||
})
|
||||
|
||||
router.get('/:id/students', getClassStudentsHandler);
|
||||
|
||||
router.use('/:classid/assignments', assignmentRouter);
|
||||
|
||||
export default router
|
Loading…
Add table
Add a link
Reference in a new issue