diff options
author | mat <27899617+mat-1@users.noreply.github.com> | 2021-02-13 17:39:12 -0600 |
---|---|---|
committer | mat <27899617+mat-1@users.noreply.github.com> | 2021-02-13 17:39:12 -0600 |
commit | 728994f435e781eeffcba739698a1c21bba76a83 (patch) | |
tree | debd936fec389cf808dedea597d5eb2c2387a89e | |
parent | 6531446675b54522ed320c89b6b6e803e8ab8999 (diff) | |
download | skyblock-api-728994f435e781eeffcba739698a1c21bba76a83.tar.gz skyblock-api-728994f435e781eeffcba739698a1c21bba76a83.tar.bz2 skyblock-api-728994f435e781eeffcba739698a1c21bba76a83.zip |
fix inventories
-rw-r--r-- | src/hypixelCached.ts | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/hypixelCached.ts b/src/hypixelCached.ts index 33d33eb..bf3124a 100644 --- a/src/hypixelCached.ts +++ b/src/hypixelCached.ts @@ -190,7 +190,8 @@ export async function fetchProfileUuid(user: string, profile: string) { * @param profile A profile name or profile uuid */ export async function fetchProfile(user: string, profile: string): Promise<CleanFullProfile> { - const profileUuid = await fetchProfileUuid(user, profile) + const playerUuid = await uuidFromUser(user) + const profileUuid = await fetchProfileUuid(playerUuid, profile) if (profileCache.has(profileUuid)) { console.log('cache hit! fetchProfile') @@ -200,12 +201,14 @@ export async function fetchProfile(user: string, profile: string): Promise<Clean const profileName = await fetchProfileName(user, profile) - const cleanProfile: CleanFullProfile = await hypixel.sendCleanApiRequest({ - path: 'skyblock/profile', - args: { - profile: profileUuid - } - }) + const cleanProfile: CleanFullProfile = await hypixel.sendCleanApiRequest( + { + path: 'skyblock/profile', + args: { profile: profileUuid } + }, + null, + { mainMemberUuid: playerUuid } + ) // we know the name from fetchProfileName, so set it here cleanProfile.name = profileName |