'How do I update this promise.all with sequelize version 6.0+?
I updated sequelize today and found out promise has been removed. I don't really understand how to update this now that it doesn't work anymore.
value: async () => {
await UserExploration.findAll().then(async users => {
await Promise.all(users.map(async user => {
if (user.user_directions === "") user.user_directions = null;
if (user.land_action === "") user.land_action = null;
if (user.user_next_land === "") user.user_next_land = null;
exploration.set(
user.user_id,
[user.explore_state,
JSON.parse(user.user_directions),
user.user_land,
JSON.parse(user.land_action),
user.user_move_point,
user.user_bonus_chance,
JSON.parse(user.user_next_land),
user.user_robbed_currency,
user.user_explorer_level,
user.user_explorer_experience]
);
}));
});
}
});```
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
