fix: integratie user + errors gefixt zodat het runt + format

This commit is contained in:
Gabriellvl 2025-03-09 23:59:31 +01:00
parent 6c4ea0eefb
commit 1b096b411b
55 changed files with 858 additions and 594 deletions

View file

@ -1,51 +1,49 @@
import express from 'express'
import express from 'express';
import {
createStudentHandler, deleteStudentHandler,
createStudentHandler,
deleteStudentHandler,
getAllStudentsHandler,
getStudentAssignmentsHandler,
getStudentClassesHandler,
getStudentHandler
getStudentHandler,
} from '../controllers/students.js';
const router = express.Router();
// root endpoint used to search objects
// Root endpoint used to search objects
router.get('/', getAllStudentsHandler);
router.post('/', createStudentHandler);
router.delete('/:username', deleteStudentHandler);
// information about a student's profile
// Information about a student's profile
router.get('/:username', getStudentHandler);
// the list of classes a student is in
// The list of classes a student is in
router.get('/:id/classes', getStudentClassesHandler);
// the list of submissions a student has made
// The list of submissions a student has made
router.get('/:id/submissions', (req, res) => {
res.json({
submissions: [ '0' ],
submissions: ['0'],
});
})
});
// the list of assignments a student has
// The list of assignments a student has
router.get('/:id/assignments', getStudentAssignmentsHandler);
// the list of groups a student is in
// The list of groups a student is in
router.get('/:id/groups', (req, res) => {
res.json({
groups: [ '0' ],
groups: ['0'],
});
})
});
// a list of questions a user has created
// A list of questions a user has created
router.get('/:id/questions', (req, res) => {
res.json({
questions: [ '0' ],
questions: ['0'],
});
})
});
export default router
export default router;