mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-19 01:35:18 -04: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,
|
id: 1,
|
||||||
name: 'testTag',
|
name: 'testTag',
|
||||||
notes: [note],
|
notes: Promise.resolve([note]),
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
const tagList = await service.toTagList(note);
|
const tagList = await service.toTagList(note);
|
||||||
|
@ -764,7 +764,7 @@ describe('NotesService', () => {
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
name: 'testTag',
|
name: 'testTag',
|
||||||
notes: [note],
|
notes: Promise.resolve([note]),
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
note.viewCount = 1337;
|
note.viewCount = 1337;
|
||||||
|
@ -866,7 +866,7 @@ describe('NotesService', () => {
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
name: 'testTag',
|
name: 'testTag',
|
||||||
notes: [note],
|
notes: Promise.resolve([note]),
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
note.viewCount = 1337;
|
note.viewCount = 1337;
|
||||||
|
|
|
@ -18,5 +18,5 @@ export class Tag {
|
||||||
name: string;
|
name: string;
|
||||||
|
|
||||||
@ManyToMany((_) => Note, (note) => note.tags)
|
@ManyToMany((_) => Note, (note) => note.tags)
|
||||||
notes: Note[];
|
notes: Promise<Note[]>;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue