mirror of
https://github.com/Snigdha-OS/package-browser.git
synced 2025-12-06 08:03:51 +01:00
🐛 fix: repository origin
This commit is contained in:
@@ -9,6 +9,9 @@ async function fetchFromMirror(url: string): Promise<Package[]> {
|
|||||||
const response = await fetch(url);
|
const response = await fetch(url);
|
||||||
const text = await response.text();
|
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
|
return text
|
||||||
.split('\n')
|
.split('\n')
|
||||||
.filter(Boolean)
|
.filter(Boolean)
|
||||||
@@ -18,7 +21,7 @@ async function fetchFromMirror(url: string): Promise<Package[]> {
|
|||||||
name,
|
name,
|
||||||
version,
|
version,
|
||||||
description: descParts.join(' '),
|
description: descParts.join(' '),
|
||||||
repository: 'core' as const,
|
repository, // use the determined repository name
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user