Merge branch 'dev' into feat/assignment-page
This commit is contained in:
commit
c29b4f8c29
21 changed files with 1004 additions and 490 deletions
|
@ -14,7 +14,7 @@ export interface StudentResponse {
|
|||
student: StudentDTO;
|
||||
}
|
||||
export interface JoinRequestsResponse {
|
||||
requests: ClassJoinRequestDTO[];
|
||||
joinRequests: ClassJoinRequestDTO[];
|
||||
}
|
||||
export interface JoinRequestResponse {
|
||||
request: ClassJoinRequestDTO;
|
||||
|
|
|
@ -11,10 +11,11 @@ export interface TeacherInvitationResponse {
|
|||
|
||||
export class TeacherInvitationController extends BaseController {
|
||||
constructor() {
|
||||
super("teachers/invitations");
|
||||
super("teacher/invitations");
|
||||
}
|
||||
|
||||
async getAll(username: string, sent: boolean): Promise<TeacherInvitationsResponse> {
|
||||
async getAll(username: string, s: boolean): Promise<TeacherInvitationsResponse> {
|
||||
const sent = s.toString();
|
||||
return this.get<TeacherInvitationsResponse>(`/${username}`, { sent });
|
||||
}
|
||||
|
||||
|
|
|
@ -54,10 +54,9 @@ export class TeacherController extends BaseController {
|
|||
studentUsername: string,
|
||||
accepted: boolean,
|
||||
): Promise<JoinRequestResponse> {
|
||||
return this.put<JoinRequestResponse>(
|
||||
`/${teacherUsername}/joinRequests/${classId}/${studentUsername}`,
|
||||
return this.put<JoinRequestResponse>(`/${teacherUsername}/joinRequests/${classId}/${studentUsername}`, {
|
||||
accepted,
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
// GetInvitations(id: string) {return this.get<{ invitations: string[] }>(`/${id}/invitations`);}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue