return swap listing in the disk route
This commit is contained in:
@@ -167,10 +167,13 @@ async function getConfig(req, res, next) {
|
||||
}
|
||||
|
||||
async function getDisks(req, res, next) {
|
||||
const [error, result] = await safe(system.getDisks());
|
||||
if (error) return next(BoxError.toHttpError(error));
|
||||
const [getDisksError, disks] = await safe(system.getDisks());
|
||||
if (getDisksError) return next(BoxError.toHttpError(getDisksError));
|
||||
|
||||
next(new HttpSuccess(200, { disks: result }));
|
||||
let [getSwapsError, swaps] = await safe(system.getSwaps());
|
||||
if (getSwapsError) return next(BoxError.toHttpError(getSwapsError));
|
||||
|
||||
next(new HttpSuccess(200, { disks, swaps }));
|
||||
}
|
||||
|
||||
async function getDiskUsage(req, res, next) {
|
||||
|
||||
Reference in New Issue
Block a user