mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 11:16:31 -05:00
refactor(tag): lazy-load relations
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
3c0c11e3d4
commit
f164e84081
2 changed files with 4 additions and 4 deletions
|
@ -657,7 +657,7 @@ describe('NotesService', () => {
|
|||
{
|
||||
id: 1,
|
||||
name: 'testTag',
|
||||
notes: [note],
|
||||
notes: Promise.resolve([note]),
|
||||
},
|
||||
]);
|
||||
const tagList = await service.toTagList(note);
|
||||
|
@ -764,7 +764,7 @@ describe('NotesService', () => {
|
|||
{
|
||||
id: 1,
|
||||
name: 'testTag',
|
||||
notes: [note],
|
||||
notes: Promise.resolve([note]),
|
||||
},
|
||||
]);
|
||||
note.viewCount = 1337;
|
||||
|
@ -866,7 +866,7 @@ describe('NotesService', () => {
|
|||
{
|
||||
id: 1,
|
||||
name: 'testTag',
|
||||
notes: [note],
|
||||
notes: Promise.resolve([note]),
|
||||
},
|
||||
]);
|
||||
note.viewCount = 1337;
|
||||
|
|
|
@ -18,5 +18,5 @@ export class Tag {
|
|||
name: string;
|
||||
|
||||
@ManyToMany((_) => Note, (note) => note.tags)
|
||||
notes: Note[];
|
||||
notes: Promise<Note[]>;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue