feat: get teachers van class
This commit is contained in:
parent
29824c549e
commit
db3c531038
2 changed files with 8 additions and 1 deletions
|
@ -3,6 +3,7 @@ import type { ClassDTO } from "@dwengo-1/common/interfaces/class";
|
|||
import type { StudentsResponse } from "./students";
|
||||
import type { AssignmentsResponse } from "./assignments";
|
||||
import type { TeacherInvitationDTO } from "@dwengo-1/common/interfaces/teacher-invitation";
|
||||
import type {TeachersResponse} from "@/controllers/teachers.ts";
|
||||
|
||||
export interface ClassesResponse {
|
||||
classes: ClassDTO[] | string[];
|
||||
|
@ -45,6 +46,10 @@ export class ClassController extends BaseController {
|
|||
return this.get<StudentsResponse>(`/${id}/students`, { full });
|
||||
}
|
||||
|
||||
async getTeachers(id: string, full = true): Promise<TeachersResponse> {
|
||||
return this.get<TeachersResponse>(`/${id}/teachers`, { full });
|
||||
}
|
||||
|
||||
// TODO
|
||||
async getTeacherInvitations(id: string, full = true): Promise<TeacherInvitationsResponse> {
|
||||
return this.get<TeacherInvitationsResponse>(`/${id}/teacher-invitations`, { full });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue