feat: teacher's assignments full stack geimplementeerd
This commit is contained in:
parent
509dd6bfab
commit
c03669eda7
5 changed files with 49 additions and 0 deletions
|
@ -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 });
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue