mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-11 18:29:17 +00:00
Fix fetch URLs by removing unnecessary slashes and ensure proper return type in fetchScripts map function
This commit is contained in:
parent
337292734a
commit
2169131863
@ -6,7 +6,7 @@ export const dynamic = "force-static";
|
||||
|
||||
const fetchCategories = async (): Promise<Category[]> => {
|
||||
const response = await fetch(
|
||||
`https://raw.githubusercontent.com/community-scripts/${basePath}/refs/heads/main/json/metadata.json`,
|
||||
`https://raw.githubusercontent.com/community-scripts${basePath}/refs/heads/main/json/metadata.json`,
|
||||
);
|
||||
const data = await response.json();
|
||||
return data.categories;
|
||||
@ -14,7 +14,7 @@ const fetchCategories = async (): Promise<Category[]> => {
|
||||
|
||||
const fetchScripts = async (): Promise<Script[]> => {
|
||||
const response = await fetch(
|
||||
`https://api.github.com/repos/community-scripts/${basePath}/contents/json`,
|
||||
`https://api.github.com/repos/community-scripts${basePath}/contents/json`,
|
||||
);
|
||||
const files: { download_url: string }[] = await response.json();
|
||||
const scripts = await Promise.all(
|
||||
|
Loading…
Reference in New Issue
Block a user