Closed LinaYahya closed 2 years ago
fix Promise.all create to run async https://github.com/GSG-G11/Fitness-house/blob/a343b78ffc071c2118fd3494de773c5c4684cf9d/server/database/fakeData/index.ts#L21-L24
Promise.all
await Promise.all([ ...users.map(async(user: any) => await User.create(user)), ...gyms.map(async(gym: any) => await Gym.create(gym)), ])
And remove subscriptions and reviews and images to another Promise.all block, to make sure to create them after creating users and gyms
fix
Promise.all
create to run async https://github.com/GSG-G11/Fitness-house/blob/a343b78ffc071c2118fd3494de773c5c4684cf9d/server/database/fakeData/index.ts#L21-L24And remove subscriptions and reviews and images to another
Promise.all
block, to make sure to create them after creating users and gyms