Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/API/getSkyBlockProfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ class getSkyBlockProfile extends Endpoint {
const res = await this.client.requestHandler.request(`/skyblock/profile?profile=${profileId}`, options);
if (res.options.raw) return res;
if (!res.data.profile) throw new Error(Errors.NO_SKYBLOCK_PROFILES);
const garden = await this.handleGettingSkyBlockGarden(res.data.profile.profile_id);
const museum = await this.handleGettingSkyBlockMuseum(res.data.profile.profile_id);
const garden = options?.museum ? await this.handleGettingSkyBlockGarden(res.data.profile.profile_id) : undefined;
const museum = options?.museum ? await this.handleGettingSkyBlockMuseum(res.data.profile.profile_id) : undefined;
const parsedProfile = new SkyBlockProfile(res.data.profile, { uuid: null, garden, museum });
return parsedProfile;
}
Expand Down
4 changes: 2 additions & 2 deletions src/API/getSkyBlockProfiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ class getSkyBlockProfiles extends Endpoint {
if (!res.data.profiles || !res.data.profiles.length) throw new Error(Errors.NO_SKYBLOCK_PROFILES);
const profiles: Map<SkyBlockProfileName | 'UNKNOWN', SkyBlockProfile> = new Map();
for (const profile of res.data.profiles) {
const garden = await this.handleGettingSkyBlockGarden(profile.profile_id);
const museum = await this.handleGettingSkyBlockMuseum(profile.profile_id);
const garden = options?.garden ? await this.handleGettingSkyBlockGarden(profile.profile_id) : undefined;
const museum = options?.museum ? await this.handleGettingSkyBlockMuseum(profile.profile_id) : undefined;
const parsedProfile = new SkyBlockProfile(profile, { uuid: query, garden, museum });
profiles.set(parsedProfile.profileName, parsedProfile);
}
Expand Down
Loading