fix: consistente naamgeving
This commit is contained in:
parent
037763a810
commit
3b71c80be6
11 changed files with 17 additions and 17 deletions
44
backend/src/routes/assignments.ts
Normal file
44
backend/src/routes/assignments.ts
Normal file
|
@ -0,0 +1,44 @@
|
|||
import express from 'express'
|
||||
import { getAssignmentHandler } from '../controllers/assignments';
|
||||
const router = express.Router({ mergeParams: true });
|
||||
|
||||
|
||||
|
||||
// root endpoint used to search objects
|
||||
router.get('/', (req, res) => {
|
||||
res.json({
|
||||
assignments: [
|
||||
'0',
|
||||
'1',
|
||||
]
|
||||
});
|
||||
});
|
||||
|
||||
// information about an assignment with id 'id'
|
||||
router.get('/:id', getAssignmentHandler);
|
||||
|
||||
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
|
Loading…
Add table
Add a link
Reference in a new issue