mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-01-23 21:44:55 +03:00
refactor: simplify resetGameAchievements by replacing Promise.all with a for loop
This commit is contained in:
parent
52c159fe51
commit
e2f798c627
@ -18,11 +18,9 @@ const resetGameAchievements = async (
|
|||||||
const achievementFiles = findAchievementFiles(game);
|
const achievementFiles = findAchievementFiles(game);
|
||||||
|
|
||||||
if (achievementFiles.length) {
|
if (achievementFiles.length) {
|
||||||
await Promise.all(
|
for (const achievementFile of achievementFiles) {
|
||||||
achievementFiles.map(async (achievementFile) => {
|
await fs.promises.rm(achievementFile.filePath);
|
||||||
await fs.promises.rm(achievementFile.filePath, { recursive: true });
|
}
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
await gameAchievementRepository.update(
|
await gameAchievementRepository.update(
|
||||||
|
Loading…
Reference in New Issue
Block a user