pinokiod 1.2.58 → 1.2.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/server/index.js +3 -0
package/package.json
CHANGED
package/server/index.js
CHANGED
|
@@ -1979,6 +1979,9 @@ class Server {
|
|
|
1979
1979
|
// if there is no menu, display all files
|
|
1980
1980
|
let p = this.kernel.path("api", name)
|
|
1981
1981
|
let files = await fs.promises.readdir(p, { withFileTypes: true })
|
|
1982
|
+
files = files.filter((file) => {
|
|
1983
|
+
return file.name.endsWith(".json") || file.name.endsWith(".js")
|
|
1984
|
+
})
|
|
1982
1985
|
config = {
|
|
1983
1986
|
title: name,
|
|
1984
1987
|
menu: files.map((file) => {
|