system: route to get filesystem
This commit is contained in:
@@ -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 }));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user