diff --git a/src/services/api.ts b/src/services/api.ts index 03e9a12..cf33335 100644 --- a/src/services/api.ts +++ b/src/services/api.ts @@ -9,6 +9,9 @@ async function fetchFromMirror(url: string): Promise { const response = await fetch(url); const text = await response.text(); + // determine the repository from the mirror URL (core or extra) + const repository = url.includes('snigdhaos-core') ? 'core' : 'extra'; + return text .split('\n') .filter(Boolean) @@ -18,7 +21,7 @@ async function fetchFromMirror(url: string): Promise { name, version, description: descParts.join(' '), - repository: 'core' as const, + repository, // use the determined repository name }; }); }