fix(backend): Services en controllers aan gewijzigde primaire sleutel van Question en Submission aangepast.

This commit is contained in:
Gerald Schmittinger 2025-04-06 23:36:23 +02:00
parent 12c1505ba7
commit f9b83bc4af
6 changed files with 12 additions and 6 deletions

View file

@ -88,7 +88,7 @@ export async function getQuestionAnswersHandler(req: Request, res: Response): Pr
export async function createQuestionHandler(req: Request, res: Response): Promise<void> {
const questionDTO = req.body as QuestionDTO;
if (!questionDTO.learningObjectIdentifier || !questionDTO.author || !questionDTO.content) {
if (!questionDTO.learningObjectIdentifier || !questionDTO.author || !questionDTO.inGroup || !questionDTO.content) {
res.status(400).json({ error: 'Missing required fields: identifier and content' });
return;
}