fix(seed): fix create method usage

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2021-11-14 21:49:31 +01:00
parent b9d3c95d2d
commit 7ef380241d
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3

View file

@ -57,14 +57,14 @@ createConnection({
users.push(User.create('hardcoded_2', 'Test User 2'));
users.push(User.create('hardcoded_3', 'Test User 3'));
const notes: Note[] = [];
notes.push(Note.create(undefined, 'test') as Note);
notes.push(Note.create(undefined, 'test2') as Note);
notes.push(Note.create(undefined, 'test3') as Note);
notes.push(Note.create(null, 'test') as Note);
notes.push(Note.create(null, 'test2') as Note);
notes.push(Note.create(null, 'test3') as Note);
for (let i = 0; i < 3; i++) {
const author = connection.manager.create(Author, Author.create(1));
const user = connection.manager.create(User, users[i]);
const identity = Identity.create(user, ProviderType.LOCAL);
const identity = Identity.create(user, ProviderType.LOCAL, false);
identity.passwordHash = await hashPassword(password);
connection.manager.create(Identity, identity);
author.user = user;