Skip to content

Commit

Permalink
fix addon getter
Browse files Browse the repository at this point in the history
  • Loading branch information
Proxwian committed Feb 6, 2024
1 parent 4ecaf1a commit 2876990
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/common/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,11 @@ export const getMirrorManifest = async modpackId => {
};

export const getMirrorAddon = async fileID => {
const url = `${MIRROR_API_URL}/addons/${fileID}.json`;
const { data } = await axioInstance.get(url);
return data?.data;
try {
const url = `${MIRROR_API_URL}/addons/${fileID}.json`;
const { data } = await axios.get(url);
return data;
} catch {
return { status: 'error' };
}
};

0 comments on commit 2876990

Please sign in to comment.