remove/inject backups secret fields

follow same pattern as dns code

fixes #615
This commit is contained in:
Girish Ramakrishnan
2019-02-09 18:08:10 -08:00
parent 51d1794e88
commit a88893b10a
9 changed files with 74 additions and 37 deletions

View File

@@ -32,6 +32,7 @@ exports = module.exports = {
};
var assert = require('assert'),
backups = require('../backups.js'),
docker = require('../docker.js'),
DockerError = docker.DockerError,
HttpError = require('connect-lastmile').HttpError,
@@ -153,7 +154,7 @@ function getBackupConfig(req, res, next) {
settings.getBackupConfig(function (error, config) {
if (error) return next(new HttpError(500, error));
next(new HttpSuccess(200, settings.removeBackupConfigPrivateFields(config)));
next(new HttpSuccess(200, backups.removePrivateFields(config)));
});
}