Merge pull request #200 from SELab-2/feat/endpoints-beschermen-met-authenticatie-#105
feat: Endpoints beschermen met authenticatie
This commit is contained in:
commit
f69a6c155a
58 changed files with 727 additions and 253 deletions
|
@ -15,6 +15,7 @@ import { invalidateAllGroupKeys } from "./groups";
|
|||
import { invalidateAllSubmissionKeys } from "./submissions";
|
||||
import type { TeachersResponse } from "@/controllers/teachers";
|
||||
import type { TeacherInvitationsResponse } from "@/controllers/teacher-invitations";
|
||||
import { studentClassesQueryKey } from "@/queries/students.ts";
|
||||
|
||||
const classController = new ClassController();
|
||||
|
||||
|
@ -171,6 +172,8 @@ export function useClassDeleteStudentMutation(): UseMutationReturnType<
|
|||
await queryClient.invalidateQueries({ queryKey: classQueryKey(data.class.id) });
|
||||
await queryClient.invalidateQueries({ queryKey: classStudentsKey(data.class.id, true) });
|
||||
await queryClient.invalidateQueries({ queryKey: classStudentsKey(data.class.id, false) });
|
||||
await queryClient.invalidateQueries({ queryKey: studentClassesQueryKey(data.class.id, false) });
|
||||
await queryClient.invalidateQueries({ queryKey: studentClassesQueryKey(data.class.id, true) });
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ function studentsQueryKey(full: boolean): [string, boolean] {
|
|||
function studentQueryKey(username: string): [string, string] {
|
||||
return ["student", username];
|
||||
}
|
||||
function studentClassesQueryKey(username: string, full: boolean): [string, string, boolean] {
|
||||
export function studentClassesQueryKey(username: string, full: boolean): [string, string, boolean] {
|
||||
return ["student-classes", username, full];
|
||||
}
|
||||
function studentAssignmentsQueryKey(username: string, full: boolean): [string, string, boolean] {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue