Add rest api to list disks where cloudron data is stored

This commit is contained in:
Johannes Zellner
2017-04-07 18:45:36 +02:00
parent 178ffe20a8
commit f2312a6768
2 changed files with 9 additions and 0 deletions

View File

@@ -10,6 +10,7 @@ exports = module.exports = {
migrate: migrate,
getProgress: getProgress,
getConfig: getConfig,
getDisks: getDisks,
update: update,
feedback: feedback,
checkForUpdates: checkForUpdates
@@ -179,6 +180,13 @@ function getConfig(req, res, next) {
});
}
function getDisks(req, res, next) {
cloudron.getDisks(function (error, result) {
if (error) return next(new HttpError(500, error));
next(new HttpSuccess(200, result));
});
}
function update(req, res, next) {
// this only initiates the update, progress can be checked via the progress route
cloudron.updateToLatest(auditSource(req), function (error) {