mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-22 09:46:30 -05:00
fix(seed): fix create method usage
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
b9d3c95d2d
commit
7ef380241d
1 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue