remove legacy system/disks route
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
exports = module.exports = {
|
||||
reboot,
|
||||
getInfo,
|
||||
getDisks,
|
||||
getDiskUsage,
|
||||
updateDiskUsage,
|
||||
getMemory,
|
||||
@@ -36,16 +35,6 @@ async function getInfo(req, res, next) {
|
||||
next(new HttpSuccess(200, { info }));
|
||||
}
|
||||
|
||||
async function getDisks(req, res, next) {
|
||||
const [getDisksError, disks] = await safe(system.getDisks());
|
||||
if (getDisksError) return next(BoxError.toHttpError(getDisksError));
|
||||
|
||||
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) {
|
||||
const [error, result] = await safe(system.getDiskUsage());
|
||||
if (error) return next(BoxError.toHttpError(error));
|
||||
|
||||
Reference in New Issue
Block a user