aboutsummaryrefslogtreecommitdiff
path: root/src/cleaners
diff options
context:
space:
mode:
Diffstat (limited to 'src/cleaners')
-rw-r--r--src/cleaners/skyblock/profiles.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cleaners/skyblock/profiles.ts b/src/cleaners/skyblock/profiles.ts
index c9f5628..f12b5f6 100644
--- a/src/cleaners/skyblock/profiles.ts
+++ b/src/cleaners/skyblock/profiles.ts
@@ -14,11 +14,11 @@ export function cleanPlayerSkyblockProfiles(rawProfiles: HypixelPlayerStatsSkyBl
/** Convert an array of raw profiles into clean profiles */
export async function cleanSkyblockProfilesResponse(data: any[]): Promise<CleanProfile[]> {
- const cleanedProfiles: CleanProfile[] = []
+ const promises = []
for (const profile of data ?? []) {
// let cleanedProfile = await cleanSkyblockProfileResponseLighter(profile)
- let cleanedProfile = await cleanSkyblockProfileResponse(profile)
- cleanedProfiles.push(cleanedProfile)
+ promises.push(cleanSkyblockProfileResponse(profile))
}
+ const cleanedProfiles: CleanProfile[] = await Promise.all(promises)
return cleanedProfiles
}