merge: fixed merge conflicts with dev

This commit is contained in:
Adriaan Jacquet 2025-04-22 17:49:11 +02:00
commit faa2f58145
165 changed files with 3948 additions and 3282 deletions

View file

@ -1,13 +1,12 @@
import express from 'express';
import { createSubmissionHandler, deleteSubmissionHandler, getSubmissionHandler, getSubmissionsHandler } from '../controllers/submissions.js';
import { onlyAllowAuthor } from '../middleware/auth/checks/question-checks.js';
import { onlyAllowIfHasAccessToSubmission, onlyAllowSubmitter } from '../middleware/auth/checks/submission-checks.js';
import { adminOnly, studentsOnly } from '../middleware/auth/checks/auth-checks.js';
const router = express.Router({ mergeParams: true });
router.get('/', adminOnly, getSubmissionsHandler);
router.post('/:id', studentsOnly, onlyAllowSubmitter, createSubmissionHandler);
router.post('/', studentsOnly, onlyAllowSubmitter, createSubmissionHandler);
router.get('/:id', onlyAllowIfHasAccessToSubmission, getSubmissionHandler);