return swap information
This commit is contained in:
@@ -5,6 +5,7 @@ exports = module.exports = {
|
||||
isRebootRequired: isRebootRequired,
|
||||
getConfig: getConfig,
|
||||
getDisks: getDisks,
|
||||
getMemory: getMemory,
|
||||
getUpdateInfo: getUpdateInfo,
|
||||
update: update,
|
||||
checkForUpdates: checkForUpdates,
|
||||
@@ -62,6 +63,14 @@ function getDisks(req, res, next) {
|
||||
});
|
||||
}
|
||||
|
||||
function getMemory(req, res, next) {
|
||||
disks.getMemory(function (error, result) {
|
||||
if (error) return next(BoxError.toHttpError(error));
|
||||
|
||||
next(new HttpSuccess(200, result));
|
||||
});
|
||||
}
|
||||
|
||||
function update(req, res, next) {
|
||||
if ('skipBackup' in req.body && typeof req.body.skipBackup !== 'boolean') return next(new HttpError(400, 'skipBackup must be a boolean'));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user