backup: add a dummy removePrivateFields
This commit is contained in:
@@ -30,7 +30,7 @@ async function load(req, res, next) {
|
||||
async function get(req, res, next) {
|
||||
assert.strictEqual(typeof req.params.id, 'string');
|
||||
|
||||
next(new HttpSuccess(200, req.resources.backup));
|
||||
next(new HttpSuccess(200, backups.removePrivateFields(req.resources.backup)));
|
||||
}
|
||||
|
||||
async function list(req, res, next) {
|
||||
@@ -43,7 +43,7 @@ async function list(req, res, next) {
|
||||
const [error, result] = await safe(backups.getByIdentifierAndStatePaged(backups.BACKUP_IDENTIFIER_BOX, backups.BACKUP_STATE_NORMAL, page, perPage));
|
||||
if (error) return next(BoxError.toHttpError(error));
|
||||
|
||||
next(new HttpSuccess(200, { backups: result }));
|
||||
next(new HttpSuccess(200, { backups: result.map(backups.removePrivateFields) }));
|
||||
}
|
||||
|
||||
async function update(req, res, next) {
|
||||
|
||||
Reference in New Issue
Block a user