feat: group queries voor alle GETs

This commit is contained in:
Adriaan Jacquet 2025-04-09 21:53:41 +02:00
parent 77ca390bd2
commit 5c9314aa59
2 changed files with 79 additions and 1 deletions

View file

@ -16,11 +16,15 @@ export class GroupController extends BaseController {
super(`class/${classid}/assignments/${assignmentNumber}/groups`);
}
update(classid: string, assignmentNumber: number) {
this.basePath = `class/${classid}/assignments/${assignmentNumber}/groups`;
}
async getAll(full = true): Promise<GroupsResponse> {
return this.get<GroupsResponse>(`/`, { full });
}
async getByNumber(num: number): Promise<GroupResponse> {
async getByNumber(num: number | string): Promise<GroupResponse> {
return this.get<GroupResponse>(`/${num}`);
}