style: fix linting issues met Prettier
This commit is contained in:
parent
7f670030a7
commit
0c47546814
30 changed files with 233 additions and 262 deletions
|
@ -12,7 +12,7 @@ import { AssignmentDTO } from '@dwengo-1/common/interfaces/assignment';
|
|||
import { fetchStudent } from './students.js';
|
||||
import { NotFoundException } from '../exceptions/not-found-exception.js';
|
||||
import { FALLBACK_VERSION_NUM } from '../config.js';
|
||||
import {ConflictException} from "../exceptions/conflict-exception";
|
||||
import { ConflictException } from '../exceptions/conflict-exception';
|
||||
|
||||
export async function getQuestionsAboutLearningObjectInAssignment(
|
||||
loId: LearningObjectIdentifier,
|
||||
|
@ -91,12 +91,12 @@ export async function createQuestion(loId: LearningObjectIdentifier, questionDat
|
|||
const assignment = mapToAssignment(questionData.inGroup.assignment as AssignmentDTO, clazz!);
|
||||
const group = await getGroupRepository().findByAssignmentAndGroupNumber(assignment, questionData.inGroup.groupNumber);
|
||||
|
||||
if (!group){
|
||||
throw new NotFoundException("Group with id and assignment not found");
|
||||
if (!group) {
|
||||
throw new NotFoundException('Group with id and assignment not found');
|
||||
}
|
||||
|
||||
if (! group.members.contains(author)) {
|
||||
throw new ConflictException("Author is not part of this group");
|
||||
if (!group.members.contains(author)) {
|
||||
throw new ConflictException('Author is not part of this group');
|
||||
}
|
||||
|
||||
const question = await questionRepository.createQuestion({
|
||||
|
|
|
@ -25,7 +25,7 @@ import { QuestionDTO, QuestionId } from '@dwengo-1/common/interfaces/question';
|
|||
import { ClassJoinRequestDTO } from '@dwengo-1/common/interfaces/class-join-request';
|
||||
import { ConflictException } from '../exceptions/conflict-exception.js';
|
||||
import { Submission } from '../entities/assignments/submission.entity';
|
||||
import {mapToUsername} from "../interfaces/user";
|
||||
import { mapToUsername } from '../interfaces/user';
|
||||
|
||||
export async function getAllStudents(full: boolean): Promise<StudentDTO[] | string[]> {
|
||||
const studentRepository = getStudentRepository();
|
||||
|
|
|
@ -32,7 +32,7 @@ export async function createInvitation(data: TeacherInvitationData): Promise<Tea
|
|||
throw new ConflictException('The teacher sending the invite is not part of the class');
|
||||
}
|
||||
|
||||
if (cls.teachers.contains(receiver)){
|
||||
if (cls.teachers.contains(receiver)) {
|
||||
throw new ConflictException('The teacher receiving the invite is already part of the class');
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ import { QuestionDTO, QuestionId } from '@dwengo-1/common/interfaces/question';
|
|||
import { ClassJoinRequestDTO } from '@dwengo-1/common/interfaces/class-join-request';
|
||||
import { ClassStatus } from '@dwengo-1/common/util/class-join-request';
|
||||
import { ConflictException } from '../exceptions/conflict-exception.js';
|
||||
import {mapToUsername} from "../interfaces/user";
|
||||
import { mapToUsername } from '../interfaces/user';
|
||||
|
||||
export async function getAllTeachers(full: boolean): Promise<TeacherDTO[] | string[]> {
|
||||
const teacherRepository: TeacherRepository = getTeacherRepository();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue