fix: backend controllers gehomologeerd #130
This commit is contained in:
parent
30ec73a88d
commit
32a3bb0dd6
10 changed files with 75 additions and 194 deletions
|
@ -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 });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue