feat: questions via student
This commit is contained in:
parent
30ec73a88d
commit
c31b471371
7 changed files with 153 additions and 171 deletions
|
@ -54,4 +54,12 @@ export class QuestionRepository extends DwengoEntityRepository<Question> {
|
|||
orderBy: { timestamp: 'ASC' },
|
||||
});
|
||||
}
|
||||
|
||||
public findAllByAuthor(author: Student): Promise<Question[]> {
|
||||
return this.findAll({
|
||||
where: { author },
|
||||
orderBy: { timestamp: 'DESC' }, // new to old
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue