remove legacy system/disks route

This commit is contained in:
Johannes Zellner
2024-05-15 14:34:12 +02:00
parent 5d41a84fec
commit 77163cc1b2
3 changed files with 0 additions and 21 deletions

View File

@@ -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));