mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-13 22:54:42 -04:00
refactor(edit): lazy-load relations
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
7f7886c5a7
commit
4e70044a2c
5 changed files with 26 additions and 20 deletions
|
@ -713,18 +713,18 @@ describe('NotesService', () => {
|
|||
const revisions = await note.revisions;
|
||||
revisions[0].edits = [
|
||||
{
|
||||
revisions: revisions,
|
||||
revisions: Promise.resolve(revisions),
|
||||
startPos: 0,
|
||||
endPos: 1,
|
||||
updatedAt: new Date(1549312452000),
|
||||
author: author,
|
||||
author: Promise.resolve(author),
|
||||
} as Edit,
|
||||
{
|
||||
revisions: revisions,
|
||||
revisions: Promise.resolve(revisions),
|
||||
startPos: 0,
|
||||
endPos: 1,
|
||||
updatedAt: new Date(1549312452001),
|
||||
author: author,
|
||||
author: Promise.resolve(author),
|
||||
} as Edit,
|
||||
];
|
||||
revisions[0].createdAt = new Date(1549312452000);
|
||||
|
@ -812,18 +812,18 @@ describe('NotesService', () => {
|
|||
const revisions = await note.revisions;
|
||||
revisions[0].edits = [
|
||||
{
|
||||
revisions: revisions,
|
||||
revisions: Promise.resolve(revisions),
|
||||
startPos: 0,
|
||||
endPos: 1,
|
||||
updatedAt: new Date(1549312452000),
|
||||
author: author,
|
||||
author: Promise.resolve(author),
|
||||
} as Edit,
|
||||
{
|
||||
revisions: revisions,
|
||||
revisions: Promise.resolve(revisions),
|
||||
startPos: 0,
|
||||
endPos: 1,
|
||||
updatedAt: new Date(1549312452001),
|
||||
author: author,
|
||||
author: Promise.resolve(author),
|
||||
} as Edit,
|
||||
];
|
||||
revisions[0].createdAt = new Date(1549312452000);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue