diff --git a/frontend/src/controllers/classes.ts b/frontend/src/controllers/classes.ts index 6a5f489c..c6c80af0 100644 --- a/frontend/src/controllers/classes.ts +++ b/frontend/src/controllers/classes.ts @@ -46,10 +46,26 @@ export class ClassController extends BaseController { return this.get(`/${id}/students`, { full }); } + async addStudent(id: string, username: string): Promise { + return this.post(`/${id}/students`, { username }); + } + + async deleteStudent(id: string, username: string): Promise { + return this.delete(`/${id}/students/${ username }`); + } + async getTeachers(id: string, full = true): Promise { return this.get(`/${id}/teachers`, { full }); } + async addTeacher(id: string, username: string): Promise { + return this.post(`/${id}/teachers`, { username }); + } + + async deleteTeacher(id: string, username: string): Promise { + return this.delete(`/${id}/teachers/${ username }`); + } + async getTeacherInvitations(id: string, full = true): Promise { return this.get(`/${id}/teacher-invitations`, { full }); }