diff options
Diffstat (limited to 'src/cleaners/skyblock')
-rw-r--r-- | src/cleaners/skyblock/profiles.ts | 6 |
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 } |