fix: backend controllers gehomologeerd #130

This commit is contained in:
Adriaan Jacquet 2025-03-22 11:41:52 +01:00
parent 30ec73a88d
commit 32a3bb0dd6
10 changed files with 75 additions and 194 deletions

View file

@ -48,7 +48,7 @@ export async function getAllQuestionsHandler(req: Request, res: Response): Promi
if (!questions) {
res.status(404).json({ error: `Questions not found.` });
} else {
res.json(questions);
res.json({ questions: questions });
}
}
@ -81,7 +81,7 @@ export async function getQuestionAnswersHandler(req: Request, res: Response): Pr
if (!answers) {
res.status(404).json({ error: `Questions not found.` });
} else {
res.json(answers);
res.json({ answers: answers });
}
}