fix: linting errors

This commit is contained in:
Adriaan Jacquet 2025-05-18 16:46:09 +02:00
parent 705bce75e9
commit 56de56564f
2 changed files with 2 additions and 2 deletions

View file

@ -40,6 +40,6 @@ export const onlyAllowIfHasAccessToSubmissionFromParams = authorize(async (auth:
return cls.teachers.map(mapToUsername).includes(auth.username);
}
const group = await fetchGroup(classId as string, +(assignmentId as string), +(groupId as string));
const group = await fetchGroup(classId as string, Number(assignmentId as string), Number(groupId as string));
return group.members.map(mapToUsername).includes(auth.username);
});

View file

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