backup: add a dummy removePrivateFields

This commit is contained in:
Girish Ramakrishnan
2025-08-13 19:45:52 +05:30
parent 0c79dcdf1b
commit 39cad02e0d
2 changed files with 8 additions and 2 deletions

View File

@@ -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) {