diff --git a/src/platforms/curseforge/curseforge-eternal-api-client.ts b/src/platforms/curseforge/curseforge-eternal-api-client.ts index f3f6abb..22fb6ba 100644 --- a/src/platforms/curseforge/curseforge-eternal-api-client.ts +++ b/src/platforms/curseforge/curseforge-eternal-api-client.ts @@ -77,7 +77,7 @@ export class CurseForgeEternalApiClient { async getProject(idOrSlug: number | string): Promise { if (!isCurseForgeProjectId(idOrSlug)) { const response = await this._fetch("/mods/search", HttpRequest.get().with({ gameId: 432, slug: idOrSlug })); - return await response.json<{ data: CurseForgeProject[] }>().then(x => x?.data?.[0]) ?? undefined; + return await response.json<{ data: CurseForgeProject[] }>().then(x => x?.data?.find(y => y.slug === idOrSlug)) ?? undefined; } const response = await this._fetch(`/mods/${idOrSlug}`);