mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-22 01:36:29 -05:00
refactor(session): lazy-load relations
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
5f87406809
commit
16c9d6c011
2 changed files with 2 additions and 2 deletions
|
@ -74,7 +74,7 @@ createConnection({
|
|||
notes[i],
|
||||
) as Revision;
|
||||
const edit = Edit.create(author, 1, 42) as Edit;
|
||||
revision.edits = [edit];
|
||||
revision.edits = Promise.resolve([edit]);
|
||||
notes[i].revisions = Promise.all([revision]);
|
||||
notes[i].userPermissions = Promise.resolve([]);
|
||||
notes[i].groupPermissions = Promise.resolve([]);
|
||||
|
|
|
@ -21,5 +21,5 @@ export class Session implements ISession {
|
|||
public json = '';
|
||||
|
||||
@ManyToOne(() => Author, (author) => author.sessions)
|
||||
author: Author;
|
||||
author: Promise<Author>;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue