Move the update info into separate route (since it is sensitive)

This commit is contained in:
Girish Ramakrishnan
2018-06-28 17:43:20 -07:00
parent cab9bc3a61
commit 35c9e99102
4 changed files with 6 additions and 2 deletions

View File

@@ -5,6 +5,7 @@ exports = module.exports = {
getProgress: getProgress,
getConfig: getConfig,
getDisks: getDisks,
getUpdateInfo: getUpdateInfo,
update: update,
feedback: feedback,
checkForUpdates: checkForUpdates,
@@ -67,6 +68,10 @@ function update(req, res, next) {
});
}
function getUpdateInfo(req, res, next) {
next(new HttpSuccess(200, { update: updateChecker.getUpdateInfo() }));
}
function checkForUpdates(req, res, next) {
async.series([
updateChecker.checkAppUpdates,