style: fix linting issues met Prettier

This commit is contained in:
Lint Action 2025-04-02 12:56:03 +00:00
parent 87366b2821
commit 899af4dec5
20 changed files with 117 additions and 118 deletions

View file

@ -1,3 +1,5 @@
import type {AssignmentDTO} from "dwengo-1-common/src/interfaces/assignment";
import type { AssignmentDTO } from "dwengo-1-common/src/interfaces/assignment";
export interface AssignmentsResponse { assignments: AssignmentDTO[] } // TODO ID
export interface AssignmentsResponse {
assignments: AssignmentDTO[];
} // TODO ID

View file

@ -1,3 +1,5 @@
import type {ClassDTO} from "dwengo-1-common/src/interfaces/class";
import type { ClassDTO } from "dwengo-1-common/src/interfaces/class";
export interface ClassesResponse { classes: ClassDTO[] | string[] }
export interface ClassesResponse {
classes: ClassDTO[] | string[];
}

View file

@ -1,3 +1,5 @@
import type {GroupDTO} from "dwengo-1-common/src/interfaces/group";
import type { GroupDTO } from "dwengo-1-common/src/interfaces/group";
export interface GroupsResponse { groups: GroupDTO[] } // | TODO id
export interface GroupsResponse {
groups: GroupDTO[];
} // | TODO id

View file

@ -1,3 +1,5 @@
import type {QuestionDTO, QuestionId} from "dwengo-1-common/src/interfaces/question";
import type { QuestionDTO, QuestionId } from "dwengo-1-common/src/interfaces/question";
export interface QuestionsResponse { questions: QuestionDTO[] | QuestionId[] }
export interface QuestionsResponse {
questions: QuestionDTO[] | QuestionId[];
}

View file

@ -1,17 +1,24 @@
import { BaseController } from "@/controllers/base-controller.ts";
import type {StudentDTO} from "dwengo-1-common/src/interfaces/student";
import type {ClassesResponse} from "@/controllers/classes.ts";
import type {AssignmentsResponse} from "@/controllers/assignments.ts";
import type {GroupsResponse} from "@/controllers/groups.ts";
import type {SubmissionsResponse} from "@/controllers/submissions.ts";
import type {QuestionsResponse} from "@/controllers/questions.ts";
import type {ClassJoinRequestDTO} from "dwengo-1-common/src/interfaces/class-join-request";
export interface StudentsResponse { students: StudentDTO[] | string[] }
export interface StudentResponse { student: StudentDTO }
export interface JoinRequestsResponse { requests: ClassJoinRequestDTO[] }
export interface JoinRequestResponse { request: ClassJoinRequestDTO }
import type { StudentDTO } from "dwengo-1-common/src/interfaces/student";
import type { ClassesResponse } from "@/controllers/classes.ts";
import type { AssignmentsResponse } from "@/controllers/assignments.ts";
import type { GroupsResponse } from "@/controllers/groups.ts";
import type { SubmissionsResponse } from "@/controllers/submissions.ts";
import type { QuestionsResponse } from "@/controllers/questions.ts";
import type { ClassJoinRequestDTO } from "dwengo-1-common/src/interfaces/class-join-request";
export interface StudentsResponse {
students: StudentDTO[] | string[];
}
export interface StudentResponse {
student: StudentDTO;
}
export interface JoinRequestsResponse {
requests: ClassJoinRequestDTO[];
}
export interface JoinRequestResponse {
request: ClassJoinRequestDTO;
}
export class StudentController extends BaseController {
constructor() {

View file

@ -1,3 +1,5 @@
import {type SubmissionDTO, SubmissionDTOId} from "dwengo-1-common/src/interfaces/submission";
import { type SubmissionDTO, SubmissionDTOId } from "dwengo-1-common/src/interfaces/submission";
export interface SubmissionsResponse { submissions: SubmissionDTO[] | SubmissionDTOId[] }
export interface SubmissionsResponse {
submissions: SubmissionDTO[] | SubmissionDTOId[];
}

View file

@ -1,12 +1,15 @@
import { BaseController } from "@/controllers/base-controller.ts";
import type {JoinRequestResponse, JoinRequestsResponse, StudentsResponse} from "@/controllers/students.ts";
import type {QuestionsResponse} from "@/controllers/questions.ts";
import type {ClassesResponse} from "@/controllers/classes.ts";
import type {TeacherDTO} from "dwengo-1-common/src/interfaces/teacher";
export interface TeachersResponse { teachers: TeacherDTO[] | string[] }
export interface TeacherResponse { teacher: TeacherDTO }
import type { JoinRequestResponse, JoinRequestsResponse, StudentsResponse } from "@/controllers/students.ts";
import type { QuestionsResponse } from "@/controllers/questions.ts";
import type { ClassesResponse } from "@/controllers/classes.ts";
import type { TeacherDTO } from "dwengo-1-common/src/interfaces/teacher";
export interface TeachersResponse {
teachers: TeacherDTO[] | string[];
}
export interface TeacherResponse {
teacher: TeacherDTO;
}
export class TeacherController extends BaseController {
constructor() {
@ -45,8 +48,16 @@ export class TeacherController extends BaseController {
return this.get<JoinRequestsResponse>(`/${username}/joinRequests/${classId}`);
}
async updateStudentJoinRequest(teacherUsername: string, classId: string, studentUsername: string, accepted: boolean): Promise<JoinRequestResponse> {
return this.put<JoinRequestResponse>(`/${teacherUsername}/joinRequests/${classId}/${studentUsername}`, accepted);
async updateStudentJoinRequest(
teacherUsername: string,
classId: string,
studentUsername: string,
accepted: boolean,
): Promise<JoinRequestResponse> {
return this.put<JoinRequestResponse>(
`/${teacherUsername}/joinRequests/${classId}/${studentUsername}`,
accepted,
);
}
// GetInvitations(id: string) {return this.get<{ invitations: string[] }>(`/${id}/invitations`);}

View file

@ -1,5 +1,5 @@
import { BaseController } from "@/controllers/base-controller.ts";
import type {Theme} from "dwengo-1-common/src/interfaces/theme";
import type { Theme } from "dwengo-1-common/src/interfaces/theme";
export class ThemeController extends BaseController {
constructor() {