feat: group queries voor alle GETs
This commit is contained in:
parent
77ca390bd2
commit
5c9314aa59
2 changed files with 79 additions and 1 deletions
|
@ -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}`);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue