mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-30 15:03:57 +00:00
fix
This commit is contained in:
@@ -68,9 +68,9 @@ module.exports = {
|
|||||||
|
|
||||||
markdownManifest_meta: 'get',
|
markdownManifest_meta: 'get',
|
||||||
async markdownManifest() {
|
async markdownManifest() {
|
||||||
if (!hasPermission(`files/markdown/write`)) return {};
|
if (!hasPermission(`files/markdown/write`)) return [];
|
||||||
const dir = path.join(filesdir(), 'markdown');
|
const dir = path.join(filesdir(), 'markdown');
|
||||||
if (!(await fs.exists(dir))) return {};
|
if (!(await fs.exists(dir))) return [];
|
||||||
const files = await fs.readdir(dir);
|
const files = await fs.readdir(dir);
|
||||||
const res = [];
|
const res = [];
|
||||||
for (const file of files) {
|
for (const file of files) {
|
||||||
|
|||||||
Reference in New Issue
Block a user