Change: seed db with all random users being followers/followed by user@example.com

This commit is contained in:
Raphael Beer 2020-03-16 14:25:14 +01:00
parent 33237d8803
commit 481c96ee04
No known key found for this signature in database
GPG Key ID: C1AC5E018B25EF11

View File

@ -928,7 +928,15 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl']
trollingComment.update({ disabled: true, updatedAt: new Date().toISOString(), closed: true }),
])
await Promise.all([...Array(30).keys()].map(() => Factory.build('user')))
const additionalUsers = await Promise.all(
[...Array(30).keys()].map(() => Factory.build('user')),
)
await Promise.all(
additionalUsers.map(async user => {
await jennyRostock.relateTo(user, 'following')
await user.relateTo(jennyRostock, 'following')
}),
)
await Promise.all(
[...Array(30).keys()].map(() =>