mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-09-11 18:04:38 +00:00
Update default image asset in the public directory and update api route to only search for files that end with .json (#5179)
* Update default image asset in the public directory * Enhance file filtering in getScripts function to include only JSON files
This commit is contained in:
parent
b001687f5c
commit
04dab68e17
2 changed files with 5 additions and 1 deletions
Binary file not shown.
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 110 KiB |
|
@ -19,7 +19,11 @@ const getMetadata = async () => {
|
|||
|
||||
const getScripts = async () => {
|
||||
const filePaths = (await fs.readdir(jsonDir))
|
||||
.filter((fileName) => fileName !== metadataFileName && fileName !== versionFileName)
|
||||
.filter((fileName) =>
|
||||
fileName.endsWith(".json") &&
|
||||
fileName !== metadataFileName &&
|
||||
fileName !== versionFileName
|
||||
)
|
||||
.map((fileName) => path.resolve(jsonDir, fileName));
|
||||
|
||||
const scripts = await Promise.all(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue