style: fix linting issues met Prettier
This commit is contained in:
		
							parent
							
								
									8e00fa53f0
								
							
						
					
					
						commit
						61424e1ea2
					
				
					 7 changed files with 13 additions and 14 deletions
				
			
		|  | @ -5,11 +5,11 @@ import { | |||
|     getAllQuestions, | ||||
|     getQuestion, | ||||
|     getQuestionsAboutLearningObjectInAssignment, | ||||
|     updateQuestion | ||||
|     updateQuestion, | ||||
| } from '../services/questions.js'; | ||||
| import { FALLBACK_LANG, FALLBACK_SEQ_NUM, FALLBACK_VERSION_NUM } from '../config.js'; | ||||
| import { LearningObjectIdentifier } from '../entities/content/learning-object-identifier.js'; | ||||
| import {QuestionData, QuestionDTO, QuestionId} from '@dwengo-1/common/interfaces/question'; | ||||
| import { QuestionData, QuestionDTO, QuestionId } from '@dwengo-1/common/interfaces/question'; | ||||
| import { Language } from '@dwengo-1/common/util/language'; | ||||
| import { requireFields } from './error-helper.js'; | ||||
| 
 | ||||
|  |  | |||
|  | @ -4,7 +4,7 @@ import { | |||
|     deleteSubmission, | ||||
|     getAllSubmissions, | ||||
|     getSubmission, | ||||
|     getSubmissionsForLearningObjectAndAssignment | ||||
|     getSubmissionsForLearningObjectAndAssignment, | ||||
| } from '../services/submissions.js'; | ||||
| import { SubmissionDTO } from '@dwengo-1/common/interfaces/submission'; | ||||
| import { Language, languageMap } from '@dwengo-1/common/util/language'; | ||||
|  | @ -28,7 +28,6 @@ export async function getSubmissionsHandler(req: Request, res: Response): Promis | |||
|     res.json(submissions); | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| export async function getSubmissionHandler(req: Request, res: Response): Promise<void> { | ||||
|     const lohruid = req.params.hruid; | ||||
|     const lang = languageMap[req.query.language as string] || Language.Dutch; | ||||
|  |  | |||
|  | @ -63,7 +63,7 @@ export class QuestionRepository extends DwengoEntityRepository<Question> { | |||
|     public async findAllByAssignment(assignment: Assignment): Promise<Question[]> { | ||||
|         return this.find({ | ||||
|             inGroup: { | ||||
|                 $contained: assignment.groups | ||||
|                 $contained: assignment.groups, | ||||
|             }, | ||||
|             learningObjectHruid: assignment.learningPathHruid, | ||||
|             learningObjectLanguage: assignment.learningPathLanguage, | ||||
|  |  | |||
|  | @ -8,7 +8,7 @@ import { getGroupRepository } from '../data/repositories.js'; | |||
| import { AssignmentDTO } from '@dwengo-1/common/interfaces/assignment'; | ||||
| import { Class } from '../entities/classes/class.entity.js'; | ||||
| import { StudentDTO } from '@dwengo-1/common/interfaces/student'; | ||||
| import {mapToClassDTO} from "./class"; | ||||
| import { mapToClassDTO } from './class'; | ||||
| 
 | ||||
| export function mapToGroup(groupDto: GroupDTO, clazz: Class): Group { | ||||
|     const assignmentDto = groupDto.assignment as AssignmentDTO; | ||||
|  |  | |||
|  | @ -2,9 +2,9 @@ import { Submission } from '../entities/assignments/submission.entity.js'; | |||
| import { mapToGroupDTO } from './group.js'; | ||||
| import { mapToStudentDTO } from './student.js'; | ||||
| import { SubmissionDTO, SubmissionDTOId } from '@dwengo-1/common/interfaces/submission'; | ||||
| import {getSubmissionRepository} from "../data/repositories"; | ||||
| import {Student} from "../entities/users/student.entity"; | ||||
| import {Group} from "../entities/assignments/group.entity"; | ||||
| import { getSubmissionRepository } from '../data/repositories'; | ||||
| import { Student } from '../entities/users/student.entity'; | ||||
| import { Group } from '../entities/assignments/group.entity'; | ||||
| 
 | ||||
| export function mapToSubmissionDTO(submission: Submission): SubmissionDTO { | ||||
|     return { | ||||
|  |  | |||
|  | @ -1,16 +1,16 @@ | |||
| import { getAnswerRepository, getAssignmentRepository, getClassRepository, getGroupRepository, getQuestionRepository } from '../data/repositories.js'; | ||||
| import {mapToLearningObjectID, mapToQuestionDTO, mapToQuestionDTOId} from '../interfaces/question.js'; | ||||
| import { mapToLearningObjectID, mapToQuestionDTO, mapToQuestionDTOId } from '../interfaces/question.js'; | ||||
| import { Question } from '../entities/questions/question.entity.js'; | ||||
| import { Answer } from '../entities/questions/answer.entity.js'; | ||||
| import { mapToAnswerDTO, mapToAnswerDTOId } from '../interfaces/answer.js'; | ||||
| import { QuestionRepository } from '../data/questions/question-repository.js'; | ||||
| import { LearningObjectIdentifier } from '../entities/content/learning-object-identifier.js'; | ||||
| import {QuestionData, QuestionDTO, QuestionId} from '@dwengo-1/common/interfaces/question'; | ||||
| import { QuestionData, QuestionDTO, QuestionId } from '@dwengo-1/common/interfaces/question'; | ||||
| import { AnswerDTO, AnswerId } from '@dwengo-1/common/interfaces/answer'; | ||||
| import { mapToAssignment } from '../interfaces/assignment.js'; | ||||
| import {AssignmentDTO} from "@dwengo-1/common/interfaces/assignment"; | ||||
| import { AssignmentDTO } from '@dwengo-1/common/interfaces/assignment'; | ||||
| import { fetchStudent } from './students.js'; | ||||
| import {NotFoundException} from "../exceptions/not-found-exception"; | ||||
| import { NotFoundException } from '../exceptions/not-found-exception'; | ||||
| import { FALLBACK_VERSION_NUM } from '../config.js'; | ||||
| 
 | ||||
| export async function getQuestionsAboutLearningObjectInAssignment( | ||||
|  |  | |||
|  | @ -6,7 +6,7 @@ import { SubmissionDTO } from '@dwengo-1/common/interfaces/submission'; | |||
| import { fetchStudent } from './students.js'; | ||||
| import { getExistingGroupFromGroupDTO } from './groups.js'; | ||||
| import { Submission } from '../entities/assignments/submission.entity.js'; | ||||
| import {Language} from "@dwengo-1/common/util/language"; | ||||
| import { Language } from '@dwengo-1/common/util/language'; | ||||
| 
 | ||||
| export async function fetchSubmission(loId: LearningObjectIdentifier, submissionNumber: number): Promise<Submission> { | ||||
|     const submissionRepository = getSubmissionRepository(); | ||||
|  |  | |||
		Reference in a new issue
	
	 Lint Action
						Lint Action