feat: teacher's assignments full stack geimplementeerd

This commit is contained in:
Adriaan Jacquet 2025-05-02 13:36:12 +02:00
parent 509dd6bfab
commit c03669eda7
5 changed files with 49 additions and 0 deletions

View file

@ -3,6 +3,7 @@ import type { JoinRequestResponse, JoinRequestsResponse, StudentsResponse } from
import type { QuestionsResponse } from "@/controllers/questions.ts";
import type { ClassesResponse } from "@/controllers/classes.ts";
import type { TeacherDTO } from "@dwengo-1/common/interfaces/teacher";
import type { AssignmentsResponse } from "./assignments";
export interface TeachersResponse {
teachers: TeacherDTO[] | string[];
@ -36,6 +37,10 @@ export class TeacherController extends BaseController {
return this.get<ClassesResponse>(`/${username}/classes`, { full });
}
async getAssignments(username: string, full = true): Promise<AssignmentsResponse> {
return this.get<AssignmentsResponse>(`/${username}/assignments`, { full });
}
async getStudents(username: string, full = false): Promise<StudentsResponse> {
return this.get<StudentsResponse>(`/${username}/students`, { full });
}