Merge remote-tracking branch 'origin/dev' into feat/indieningen-kunnen-posten-en-bekijken-#194
# Conflicts: # backend/tests/setup-tests.ts
This commit is contained in:
commit
dd2cdf3fe9
46 changed files with 1670 additions and 123 deletions
|
@ -5,7 +5,7 @@ const router = express.Router({ mergeParams: true });
|
|||
// Root endpoint used to search objects
|
||||
router.get('/', getSubmissionsHandler);
|
||||
|
||||
router.post('/:id', createSubmissionHandler);
|
||||
router.post('/', createSubmissionHandler);
|
||||
|
||||
// Information about an submission with id 'id'
|
||||
router.get('/:id', getSubmissionHandler);
|
||||
|
|
22
backend/src/routes/teacher-invitations.ts
Normal file
22
backend/src/routes/teacher-invitations.ts
Normal file
|
@ -0,0 +1,22 @@
|
|||
import express from 'express';
|
||||
import {
|
||||
createInvitationHandler,
|
||||
deleteInvitationHandler,
|
||||
getAllInvitationsHandler,
|
||||
getInvitationHandler,
|
||||
updateInvitationHandler,
|
||||
} from '../controllers/teacher-invitations';
|
||||
|
||||
const router = express.Router({ mergeParams: true });
|
||||
|
||||
router.get('/:username', getAllInvitationsHandler);
|
||||
|
||||
router.get('/:sender/:receiver/:classId', getInvitationHandler);
|
||||
|
||||
router.post('/', createInvitationHandler);
|
||||
|
||||
router.put('/', updateInvitationHandler);
|
||||
|
||||
router.delete('/:sender/:receiver/:classId', deleteInvitationHandler);
|
||||
|
||||
export default router;
|
|
@ -10,6 +10,8 @@ import {
|
|||
getTeacherStudentHandler,
|
||||
updateStudentJoinRequestHandler,
|
||||
} from '../controllers/teachers.js';
|
||||
import invitationRouter from './teacher-invitations.js';
|
||||
|
||||
const router = express.Router();
|
||||
|
||||
// Root endpoint used to search objects
|
||||
|
@ -32,10 +34,6 @@ router.get('/:username/joinRequests/:classId', getStudentJoinRequestHandler);
|
|||
router.put('/:username/joinRequests/:classId/:studentUsername', updateStudentJoinRequestHandler);
|
||||
|
||||
// Invitations to other classes a teacher received
|
||||
router.get('/:id/invitations', (_req, res) => {
|
||||
res.json({
|
||||
invitations: ['0'],
|
||||
});
|
||||
});
|
||||
router.get('/invitations', invitationRouter);
|
||||
|
||||
export default router;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue