From adb27445ff20d8409a7ab6123f6c5f795300d43e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sascha=20K=C3=BChl?= Date: Wed, 12 Mar 2025 15:54:00 +0100 Subject: [PATCH] added roles for each demo user --- backend/index.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/backend/index.js b/backend/index.js index 84026f8..44cca17 100644 --- a/backend/index.js +++ b/backend/index.js @@ -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' },