feat: requirefields in backend controllers (class, assignment, submission, group)
This commit is contained in:
parent
d2f5219b69
commit
c52bcde3ae
3 changed files with 38 additions and 63 deletions
|
@ -22,8 +22,8 @@ export async function createAssignmentHandler(req: Request, res: Response): Prom
|
|||
const title = req.body.title;
|
||||
|
||||
requireFields({ description, language, learningPath, title });
|
||||
const assignmentData = req.body as AssignmentDTO;
|
||||
|
||||
const assignmentData = req.body as AssignmentDTO;
|
||||
const assignment = await createAssignment(classid, assignmentData);
|
||||
|
||||
res.json({ assignment });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue