feat: test controller student
This commit is contained in:
parent
52364d717c
commit
5490bd6b86
4 changed files with 165 additions and 47 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue