From e04d26307e655cdfd37871e1221e3a472b9e5c98 Mon Sep 17 00:00:00 2001 From: Paul Nettleton Date: Tue, 29 Nov 2022 11:55:22 -0600 Subject: [PATCH] Update FileSystemController.js to respond with objects Changes: - `getPaths` (GET /api/filesystem) --- server/controllers/FileSystemController.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/controllers/FileSystemController.js b/server/controllers/FileSystemController.js index 3a592b74..721f9455 100644 --- a/server/controllers/FileSystemController.js +++ b/server/controllers/FileSystemController.js @@ -19,8 +19,9 @@ class FileSystemController { }) Logger.debug(`[Server] get file system paths, excluded: ${excludedDirs.join(', ')}`) - var dirs = await this.getDirectories(global.appRoot, '/', excludedDirs) - res.json(dirs) + res.json({ + directories: await this.getDirectories(global.appRoot, '/', excludedDirs) + }) } } module.exports = new FileSystemController() \ No newline at end of file