Add rest api to list disks where cloudron data is stored
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user