feat: test controller student

This commit is contained in:
Gabriellvl 2025-03-24 11:36:05 +01:00
parent 52364d717c
commit 5490bd6b86
4 changed files with 165 additions and 47 deletions

View file

@ -138,8 +138,10 @@ export async function getStudentQuestions(username: string, full: boolean): Prom
const questionRepository = getQuestionRepository();
const questions = await questionRepository.findAllByAuthor(student);
if (full)
return questions.map(mapToQuestionDTO)
const questionsDTO = questions.map(mapToQuestionDTO);
return questions.map(mapToQuestionId);
if (full)
return questionsDTO;
return questionsDTO.map(mapToQuestionId);
}