style: fix linting issues met Prettier
This commit is contained in:
parent
705bce75e9
commit
01c90586bd
2 changed files with 7 additions and 3 deletions
|
@ -34,7 +34,7 @@ export const onlyAllowIfHasAccessToSubmissionFromParams = authorize(async (auth:
|
|||
const { classId, assignmentId, groupId } = req.query;
|
||||
|
||||
requireFields({ classId, assignmentId, groupId });
|
||||
|
||||
|
||||
if (auth.accountType === AccountType.Teacher) {
|
||||
const cls = await fetchClass(classId as string);
|
||||
return cls.teachers.map(mapToUsername).includes(auth.username);
|
||||
|
@ -42,4 +42,4 @@ export const onlyAllowIfHasAccessToSubmissionFromParams = authorize(async (auth:
|
|||
|
||||
const group = await fetchGroup(classId as string, +(assignmentId as string), +(groupId as string));
|
||||
return group.members.map(mapToUsername).includes(auth.username);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
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 {
|
||||
onlyAllowIfHasAccessToSubmission,
|
||||
onlyAllowIfHasAccessToSubmissionFromParams,
|
||||
onlyAllowSubmitter,
|
||||
} from '../middleware/auth/checks/submission-checks.js';
|
||||
import { adminOnly, studentsOnly } from '../middleware/auth/checks/auth-checks.js';
|
||||
const router = express.Router({ mergeParams: true });
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue