From 0440aa8249234e1aeb572e1909e58c4f0ed5ddfa Mon Sep 17 00:00:00 2001 From: eshanized Date: Sat, 11 Jan 2025 01:00:14 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20repository=20origin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/services/api.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 }; }); }