From d0f7262b1b132f990d7cdc9c88eda927515723ad Mon Sep 17 00:00:00 2001 From: mat Date: Sun, 10 Apr 2022 18:54:48 -0500 Subject: Cache usernames and ranks in leaderboards in db --- src/cleaners/skyblock/profiles.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/cleaners/skyblock') diff --git a/src/cleaners/skyblock/profiles.ts b/src/cleaners/skyblock/profiles.ts index f046e22..519c6d5 100644 --- a/src/cleaners/skyblock/profiles.ts +++ b/src/cleaners/skyblock/profiles.ts @@ -20,7 +20,9 @@ export function cleanPlayerSkyblockProfiles(rawProfiles: HypixelPlayerStatsSkyBl } /** Convert an array of raw profiles into clean profiles */ -export async function cleanSkyblockProfilesResponse(data: typedHypixelApi.SkyBlockProfilesResponse['profiles']): Promise { +export async function cleanSkyblockProfilesResponse(data: typedHypixelApi.SkyBlockProfilesResponse['profiles']): Promise { + if (data === null) return null + const promises: Promise[] = [] for (const profile of data) { promises.push(cleanSkyblockProfileResponse(profile)) -- cgit