fix: DELETE en POST endpoints toegevoegd
This commit is contained in:
parent
400a955850
commit
8c7d5e965c
6 changed files with 17 additions and 5 deletions
|
@ -26,7 +26,7 @@ export async function createAssignmentHandler(req: Request<AssignmentParams>, re
|
|||
|
||||
if (!assignmentData.description || !assignmentData.language || !assignmentData.learningPath || !assignmentData.title) {
|
||||
res.status(400).json({
|
||||
error: 'Missing one or more required fields: title, description, learningPath, title',
|
||||
error: 'Missing one or more required fields: title, description, learningPath, language',
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ import { Request, Response } from 'express';
|
|||
import {
|
||||
createStudent,
|
||||
deleteStudent,
|
||||
getAllStudents,
|
||||
getStudent,
|
||||
getStudentAssignments,
|
||||
getStudentClasses,
|
||||
|
@ -142,7 +143,4 @@ export async function getStudentSubmissionsHandler(req: Request, res: Response):
|
|||
res.json({
|
||||
submissions: submissions,
|
||||
});
|
||||
}
|
||||
function getAllStudents(): StudentDTO[] | string[] | PromiseLike<StudentDTO[] | string[]> {
|
||||
throw new Error('Function not implemented.');
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue