fix: verwijder console log, dummy route en _allowupdate
This commit is contained in:
parent
7da52284e6
commit
c48ec0fa54
3 changed files with 2 additions and 12 deletions
|
@ -26,13 +26,6 @@ router.delete('/:groupid', teachersOnly, onlyAllowIfHasAccessToAssignment, delet
|
||||||
|
|
||||||
router.get('/:groupid/submissions', onlyAllowIfHasAccessToGroup, getGroupSubmissionsHandler);
|
router.get('/:groupid/submissions', onlyAllowIfHasAccessToGroup, getGroupSubmissionsHandler);
|
||||||
|
|
||||||
// The list of questions a group has made
|
router.get('/:groupid/questions', onlyAllowIfHasAccessToGroup, getGroupQuestionsHandler);
|
||||||
router.get('/:groupid/questions', onlyAllowIfHasAccessToGroup, (_req, res) => {
|
|
||||||
res.json({
|
|
||||||
questions: ['0'],
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
router.get('/:groupid/questions', getGroupQuestionsHandler);
|
|
||||||
|
|
||||||
export default router;
|
export default router;
|
||||||
|
|
|
@ -59,8 +59,7 @@ export async function getStudent(username: string): Promise<StudentDTO> {
|
||||||
return mapToStudentDTO(user);
|
return mapToStudentDTO(user);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO allowupdate parameter?
|
export async function createStudent(userData: StudentDTO): Promise<StudentDTO> {
|
||||||
export async function createStudent(userData: StudentDTO, _allowUpdate = false): Promise<StudentDTO> {
|
|
||||||
const studentRepository = getStudentRepository();
|
const studentRepository = getStudentRepository();
|
||||||
|
|
||||||
const newStudent = mapToStudent(userData);
|
const newStudent = mapToStudent(userData);
|
||||||
|
|
|
@ -126,8 +126,6 @@
|
||||||
usernameTeacher.value = "";
|
usernameTeacher.value = "";
|
||||||
},
|
},
|
||||||
onError: (e) => {
|
onError: (e) => {
|
||||||
console.log("error", e);
|
|
||||||
console.log(e.response.data.error);
|
|
||||||
showSnackbar(t("failed") + ": " + e.response.data.error || e.message, "error");
|
showSnackbar(t("failed") + ": " + e.response.data.error || e.message, "error");
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue