Merge branch 'dev' into feat/assignment-page

This commit is contained in:
Laure Jablonski 2025-04-20 10:23:01 +02:00 committed by GitHub
commit c29b4f8c29
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 1004 additions and 490 deletions

View file

@ -14,7 +14,7 @@ export interface StudentResponse {
student: StudentDTO;
}
export interface JoinRequestsResponse {
requests: ClassJoinRequestDTO[];
joinRequests: ClassJoinRequestDTO[];
}
export interface JoinRequestResponse {
request: ClassJoinRequestDTO;

View file

@ -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 });
}

View file

@ -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`);}