system: merge info and dmi routes

also return uptimeSecs instead of abstract date
This commit is contained in:
Girish Ramakrishnan
2023-12-04 01:09:42 +01:00
parent eb64bd296a
commit cbf1b47332
5 changed files with 21 additions and 31 deletions

View File

@@ -12,7 +12,6 @@ exports = module.exports = {
getSystemGraphs,
getBlockDevices,
getCpus,
getDmi
};
const assert = require('assert'),
@@ -152,10 +151,3 @@ async function getCpus(req, res, next) {
next(new HttpSuccess(200, { cpus }));
}
async function getDmi(req, res, next) {
const [error, dmi] = await safe(system.getDmi());
if (error) return next(BoxError.toHttpError(error));
next(new HttpSuccess(200, { dmi }));
}