Skip to content

Commit

Permalink
fix: only use minecraft version when searching
Browse files Browse the repository at this point in the history
  • Loading branch information
Schlauer-Hax committed Feb 1, 2024
1 parent 3ee0584 commit c8aca2c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pages/hosting/modrinth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ async function find(versions: string[], type: ServerTypes, offset = 0, limit = 2
path.searchParams.set("limit", limit.toString());
path.searchParams.set("offset", offset.toString());

const json = await retry<SearchResponse>(async () => {
const json: SearchResponse = await retry<SearchResponse>(async () => {
const response = await pipeline.fetch(SchedulerPriority.High, path.toString());
assert(response.ok);
return response.json();
Expand Down
3 changes: 2 additions & 1 deletion pages/hosting/views/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ function addonBrowser(server: StateHandler<Server>): RenderItem {

const loader = createCachedLoader(createIndexPaginationLoader({
limit: 80,
loader: (offset, limit) => getRealFiltered([ server.version ], server.type, offset, limit),
// We need to split because forge has forge version in version field :(
loader: (offset, limit) => getRealFiltered([ server.version.split('-')[0] ], server.type, offset, limit),
}));

return {
Expand Down

0 comments on commit c8aca2c

Please sign in to comment.