style: fix linting issues met Prettier
This commit is contained in:
parent
9895d22521
commit
ee5f69cbc8
20 changed files with 188 additions and 192 deletions
|
@ -1,4 +1,4 @@
|
|||
import {BadRequestException} from "../exceptions/bad-request-exception";
|
||||
import { BadRequestException } from '../exceptions/bad-request-exception';
|
||||
|
||||
/**
|
||||
* Checks for the presence of required fields and throws a BadRequestException
|
||||
|
|
|
@ -1,17 +1,20 @@
|
|||
import { Request, Response } from 'express';
|
||||
import {
|
||||
createClassJoinRequest,
|
||||
createStudent, deleteClassJoinRequest,
|
||||
createStudent,
|
||||
deleteClassJoinRequest,
|
||||
deleteStudent,
|
||||
getAllStudents, getJoinRequestsByStudent,
|
||||
getAllStudents,
|
||||
getJoinRequestsByStudent,
|
||||
getStudent,
|
||||
getStudentAssignments,
|
||||
getStudentClasses,
|
||||
getStudentGroups, getStudentQuestions,
|
||||
getStudentGroups,
|
||||
getStudentQuestions,
|
||||
getStudentSubmissions,
|
||||
} from '../services/students.js';
|
||||
import { StudentDTO } from '../interfaces/student.js';
|
||||
import {requireFields} from "./error-helper.js";
|
||||
import { requireFields } from './error-helper.js';
|
||||
|
||||
export async function getAllStudentsHandler(req: Request, res: Response): Promise<void> {
|
||||
const full = req.query.full === 'true';
|
||||
|
@ -128,7 +131,7 @@ export async function getStudentRequestHandler(req: Request, res: Response): Pro
|
|||
requireFields({ username });
|
||||
|
||||
const requests = await getJoinRequestsByStudent(username);
|
||||
res.status(201).json({ requests })
|
||||
res.status(201).json({ requests });
|
||||
}
|
||||
|
||||
export async function deleteClassJoinRequestHandler(req: Request, res: Response) {
|
||||
|
@ -139,5 +142,3 @@ export async function deleteClassJoinRequestHandler(req: Request, res: Response)
|
|||
await deleteClassJoinRequest(username, classId);
|
||||
res.sendStatus(204);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -3,16 +3,18 @@ import {
|
|||
createTeacher,
|
||||
deleteTeacher,
|
||||
getAllTeachers,
|
||||
getClassesByTeacher, getJoinRequestsByClass,
|
||||
getClassesByTeacher,
|
||||
getJoinRequestsByClass,
|
||||
getStudentsByTeacher,
|
||||
getTeacher,
|
||||
getTeacherQuestions, updateClassJoinRequestStatus
|
||||
getTeacherQuestions,
|
||||
updateClassJoinRequestStatus,
|
||||
} from '../services/teachers.js';
|
||||
import { ClassDTO } from '../interfaces/class.js';
|
||||
import { StudentDTO } from '../interfaces/student.js';
|
||||
import { QuestionDTO, QuestionId } from '../interfaces/question.js';
|
||||
import { TeacherDTO } from '../interfaces/teacher.js';
|
||||
import {requireFields} from "./error-helper.js";
|
||||
import { requireFields } from './error-helper.js';
|
||||
|
||||
export async function getAllTeachersHandler(req: Request, res: Response): Promise<void> {
|
||||
const full = req.query.full === 'true';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue