mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-04-15 23:35:13 +00:00
fix(revisions-service: user query builder
For reasons, the typeorm 0.3 broke the find() method when using relations in the WHERE clause. This replaces the find method with a query builder. Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
c4975e4783
commit
366aead689
1 changed files with 5 additions and 5 deletions
|
@ -34,11 +34,11 @@ export class RevisionsService {
|
|||
}
|
||||
|
||||
async getAllRevisions(note: Note): Promise<Revision[]> {
|
||||
return await this.revisionRepository.find({
|
||||
where: {
|
||||
note: Equal(note),
|
||||
},
|
||||
});
|
||||
this.logger.debug(`Getting all revisions for note ${note.id}`);
|
||||
return await this.revisionRepository
|
||||
.createQueryBuilder('revision')
|
||||
.where('revision.note = :note', { note: note.id })
|
||||
.getMany();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue