added roles for each demo user

This commit is contained in:
Sascha Kühl 2025-03-12 15:54:00 +01:00
parent 515041a6ff
commit adb27445ff
1 changed files with 7 additions and 0 deletions

View File

@ -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' },