system: route to get filesystem

This commit is contained in:
Girish Ramakrishnan
2025-07-16 17:20:15 +02:00
parent b42be9899e
commit 4b79881472
4 changed files with 13 additions and 6 deletions
+8
View File
@@ -11,6 +11,7 @@ exports = module.exports = {
getMetrics,
getMetricStream,
getBlockDevices,
getFilesystems,
getCpus,
};
@@ -175,3 +176,10 @@ async function getCpus(req, res, next) {
next(new HttpSuccess(200, { cpus }));
}
async function getFilesystems(req, res, next) {
const [error, filesystems] = await safe(system.getFilesystems());
if (error) return next(new HttpError(500, error));
next(new HttpSuccess(200, { filesystems }));
}