feat: group's questions route controller en service geimplementeerd
This commit is contained in:
parent
9a7a193af7
commit
074c5e510a
3 changed files with 43 additions and 2 deletions
|
@ -77,6 +77,13 @@ export class QuestionRepository extends DwengoEntityRepository<Question> {
|
|||
});
|
||||
}
|
||||
|
||||
public async findAllByGroup(inGroup: Group): Promise<Question[]> {
|
||||
return this.findAll({
|
||||
where: { inGroup },
|
||||
orderBy: { timestamp: 'DESC' },
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Looks up all questions for the given learning object which were asked as part of the given assignment.
|
||||
* When forStudentUsername is set, only the questions within the given user's group are shown.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue