fix: integratie user + errors gefixt zodat het runt + format
This commit is contained in:
parent
6c4ea0eefb
commit
1b096b411b
55 changed files with 858 additions and 594 deletions
|
@ -1,31 +1,30 @@
|
|||
import express from 'express'
|
||||
import { getAllAssignmentsHandler, getAssignmentHandler } from '../controllers/assignments.js';
|
||||
import groupRouter from './group.js';
|
||||
import express from 'express';
|
||||
import {
|
||||
getAllAssignmentsHandler,
|
||||
getAssignmentHandler,
|
||||
} from '../controllers/assignments.js';
|
||||
import groupRouter from './groups.js';
|
||||
|
||||
const router = express.Router({ mergeParams: true });
|
||||
|
||||
// root endpoint used to search objects
|
||||
// Root endpoint used to search objects
|
||||
router.get('/', getAllAssignmentsHandler);
|
||||
|
||||
// information about an assignment with id 'id'
|
||||
// Information about an assignment with id 'id'
|
||||
router.get('/:id', getAssignmentHandler);
|
||||
|
||||
router.get('/:id/submissions', (req, res) => {
|
||||
res.json({
|
||||
submissions: [
|
||||
'0'
|
||||
],
|
||||
submissions: ['0'],
|
||||
});
|
||||
});
|
||||
|
||||
router.get('/:id/questions', (req, res) => {
|
||||
res.json({
|
||||
questions: [
|
||||
'0'
|
||||
],
|
||||
questions: ['0'],
|
||||
});
|
||||
});
|
||||
|
||||
router.use('/:assignmentid/groups', groupRouter);
|
||||
|
||||
export default router
|
||||
export default router;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue