fix: linting errors
This commit is contained in:
		
							parent
							
								
									705bce75e9
								
							
						
					
					
						commit
						56de56564f
					
				
					 2 changed files with 2 additions and 2 deletions
				
			
		|  | @ -40,6 +40,6 @@ export const onlyAllowIfHasAccessToSubmissionFromParams = authorize(async (auth: | ||||||
|         return cls.teachers.map(mapToUsername).includes(auth.username); |         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); |     return group.members.map(mapToUsername).includes(auth.username); | ||||||
| }); | }); | ||||||
|  | @ -1,7 +1,7 @@ | ||||||
| import express from 'express'; | import express from 'express'; | ||||||
| import { createSubmissionHandler, deleteSubmissionHandler, getSubmissionHandler, getSubmissionsHandler } from '../controllers/submissions.js'; | 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'; | import { studentsOnly } from '../middleware/auth/checks/auth-checks.js'; | ||||||
| const router = express.Router({ mergeParams: true }); | const router = express.Router({ mergeParams: true }); | ||||||
| 
 | 
 | ||||||
| router.get('/', onlyAllowIfHasAccessToSubmissionFromParams, getSubmissionsHandler); | router.get('/', onlyAllowIfHasAccessToSubmissionFromParams, getSubmissionsHandler); | ||||||
|  |  | ||||||
		Reference in a new issue
	
	 Adriaan Jacquet
						Adriaan Jacquet