Blame view
imports/startup/server/fixtures.js
345 Bytes
2b1ad7917
|
1 2 3 4 |
const users = [{ email: 'admin@admin.com', password: 'password', profile: { |
f0c912bf1
|
5 6 |
name: { first: 'Carl', last: 'Winslow' }, }, |
2b1ad7917
|
7 |
}]; |
f0c912bf1
|
8 9 |
users.forEach(({ email, password, profile }) => { const userExists = Meteor.users.findOne({ 'emails.address': email }); |
2b1ad7917
|
10 |
|
f0c912bf1
|
11 12 |
if (!userExists) { Accounts.createUser({ email, password, profile }); |
2b1ad7917
|
13 14 |
} }); |