fix: lint opnieuw
This commit is contained in:
		
							parent
							
								
									0862cb5c6b
								
							
						
					
					
						commit
						b6d522ce0b
					
				
					 1 changed files with 4 additions and 4 deletions
				
			
		|  | @ -19,8 +19,6 @@ import { putObject } from './service-helper.js'; | ||||||
| import { fetchStudents } from './students.js'; | import { fetchStudents } from './students.js'; | ||||||
| import { ServerErrorException } from '../exceptions/server-error-exception.js'; | import { ServerErrorException } from '../exceptions/server-error-exception.js'; | ||||||
| import { BadRequestException } from '../exceptions/bad-request-exception.js'; | import { BadRequestException } from '../exceptions/bad-request-exception.js'; | ||||||
| import { getQuestionsAboutLearningObjectInAssignment } from './questions'; |  | ||||||
| import { LearningObjectIdentifier } from '../entities/content/learning-object-identifier'; |  | ||||||
| import { ConflictException } from '../exceptions/conflict-exception'; | import { ConflictException } from '../exceptions/conflict-exception'; | ||||||
| 
 | 
 | ||||||
| export async function fetchAssignment(classid: string, assignmentNumber: number): Promise<Assignment> { | export async function fetchAssignment(classid: string, assignmentNumber: number): Promise<Assignment> { | ||||||
|  | @ -139,8 +137,10 @@ export async function deleteAssignment(classid: string, id: number): Promise<Ass | ||||||
| 
 | 
 | ||||||
|     try { |     try { | ||||||
|         await assignmentRepository.deleteByClassAndId(cls, id); |         await assignmentRepository.deleteByClassAndId(cls, id); | ||||||
|     } catch (e: ForeignKeyConstraintViolationException) { |     } catch (e: unkown) { | ||||||
|         throw new ConflictException('Cannot delete assigment with questions or submissions'); |         if (e instanceof ForeignKeyConstraintViolationException) | ||||||
|  |             {throw new ConflictException("Cannot delete assigment with questions or submissions");} | ||||||
|  |         else {throw e;} | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     return mapToAssignmentDTO(assignment); |     return mapToAssignmentDTO(assignment); | ||||||
|  |  | ||||||
		Reference in a new issue
	
	 Gabriellvl
						Gabriellvl