style: fix linting issues met Prettier

This commit is contained in:
Lint Action 2025-05-20 11:52:23 +00:00
parent 1c118a42f3
commit 74099fedc7
2 changed files with 2 additions and 3 deletions

View file

@ -103,7 +103,6 @@ function hasDuplicates(arr: string[]): boolean {
export async function putAssignment(classid: string, id: number, assignmentData: Partial<AssignmentDTO>): Promise<AssignmentDTO> {
const assignment = await fetchAssignment(classid, id);
if (assignmentData.groups) {
if (hasDuplicates(assignmentData.groups.flat() as string[])) {
throw new BadRequestException('Student can only be in one group');
@ -124,7 +123,7 @@ export async function putAssignment(classid: string, id: number, assignmentData:
await groupRepository.save(newGroup);
})
);
} catch(e: unknown) {
} catch (e: unknown) {
if (e instanceof ForeignKeyConstraintViolationException || e instanceof PostgreSqlExceptionConverter) {
throw new ConflictException('Cannot update assigment with questions or submissions');
} else {

View file

@ -149,7 +149,7 @@
const message = err.response?.data?.error || err.message || t("unknownError");
showSnackbar(t("failed") + ": " + message, "error");
},
}
},
);
}