added roles for each demo user
This commit is contained in:
parent
515041a6ff
commit
adb27445ff
|
|
@ -55,6 +55,13 @@ function initial() {
|
|||
{ firstName: 'Pedro', lastName: 'Martinez', dateOfBirth: new Date(1971, 10, 25), email: 'pedro.martinez@bullpen.com', password: bcrypt.hashSync('pedro', 8) },
|
||||
{ firstName: 'randy', lastName: 'johnson', dateOfBirth: new Date(1963, 9, 10), email: 'randy.johnson@bullpen.com', password: bcrypt.hashSync('randy', 8) }
|
||||
]);
|
||||
|
||||
User.findAll().then(users => {
|
||||
users.forEach(user => {
|
||||
user.setRoles([1]);
|
||||
});
|
||||
});
|
||||
|
||||
PitchType.bulkCreate([
|
||||
{ name: 'Fastball', abbreviation: 'FB' },
|
||||
{ name: 'Curveball', abbreviation: 'CB' },
|
||||
|
|
|
|||
Loading…
Reference in New Issue