fix: verwijder console log, dummy route en _allowupdate

This commit is contained in:
Gabriellvl 2025-05-15 21:05:54 +02:00
parent 7da52284e6
commit c48ec0fa54
3 changed files with 2 additions and 12 deletions

View file

@ -26,13 +26,6 @@ router.delete('/:groupid', teachersOnly, onlyAllowIfHasAccessToAssignment, delet
router.get('/:groupid/submissions', onlyAllowIfHasAccessToGroup, getGroupSubmissionsHandler);
// The list of questions a group has made
router.get('/:groupid/questions', onlyAllowIfHasAccessToGroup, (_req, res) => {
res.json({
questions: ['0'],
});
});
router.get('/:groupid/questions', getGroupQuestionsHandler);
router.get('/:groupid/questions', onlyAllowIfHasAccessToGroup, getGroupQuestionsHandler);
export default router;

View file

@ -59,8 +59,7 @@ export async function getStudent(username: string): Promise<StudentDTO> {
return mapToStudentDTO(user);
}
// TODO allowupdate parameter?
export async function createStudent(userData: StudentDTO, _allowUpdate = false): Promise<StudentDTO> {
export async function createStudent(userData: StudentDTO): Promise<StudentDTO> {
const studentRepository = getStudentRepository();
const newStudent = mapToStudent(userData);

View file

@ -126,8 +126,6 @@
usernameTeacher.value = "";
},
onError: (e) => {
console.log("error", e);
console.log(e.response.data.error);
showSnackbar(t("failed") + ": " + e.response.data.error || e.message, "error");
},
});