refactor(author): lazy-load relations

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2021-11-16 18:45:40 +01:00
parent de6d75238c
commit 5d7b544e1f
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
4 changed files with 10 additions and 10 deletions

View file

@ -67,7 +67,7 @@ createConnection({
const identity = Identity.create(user, ProviderType.LOCAL, false);
identity.passwordHash = await hashPassword(password);
connection.manager.create(Identity, identity);
author.user = user;
author.user = Promise.resolve(user);
const revision = Revision.create(
'This is a test note',
'This is a test note',