mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-16 16:14:43 -04: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[]> {
|
async getAllRevisions(note: Note): Promise<Revision[]> {
|
||||||
return await this.revisionRepository.find({
|
this.logger.debug(`Getting all revisions for note ${note.id}`);
|
||||||
where: {
|
return await this.revisionRepository
|
||||||
note: Equal(note),
|
.createQueryBuilder('revision')
|
||||||
},
|
.where('revision.note = :note', { note: note.id })
|
||||||
});
|
.getMany();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue