Skip to content

Commit

Permalink
Fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
Strokkur424 committed Oct 25, 2024
1 parent 0fcdff1 commit 1397441
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/util/versionUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,19 @@ const createProjectVersionsValue = (
ttl: number = 5 * 60 * 1000
): ExpiringValue<string[]> => {
return new ExpiringValue(ttl, async () => {
const result = await fetch(`https://api.papermc.io/v2/projects/${project}`).then((r) => r.json());
const result = await fetch(`https://api.papermc.io/v2/projects/${project}`).then((r) =>
r.json()
);

return result.versions;
});
};

const createUserdevVersionsValue = (ttl: number = 5 * 60 * 1000): ExpiringValue<string[]> => {
return new ExpiringValue(ttl, async () => {
const json = await fetch("https://api.github.com/repos/PaperMC/paperweight/tags").then((r) => r.json());
const json = await fetch("https://api.github.com/repos/PaperMC/paperweight/tags").then((r) =>
r.json()
);

return json.map((e) => e.name.substring(1)).reverse();
});
Expand Down

0 comments on commit 1397441

Please sign in to comment.