Rename getByIdentifierAndStatePaged to listByIdentifierAndStatePaged

This commit is contained in:
Girish Ramakrishnan
2026-02-15 12:15:55 +01:00
parent eae86d15ef
commit fc2e39f41b
6 changed files with 22 additions and 22 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ async function list(req, res, next) {
const perPage = typeof req.query.per_page === 'string'? parseInt(req.query.per_page) : 25;
if (!perPage || perPage < 0) return next(new HttpError(400, 'per_page query param has to be a postive number'));
const [error, result] = await safe(backups.getByIdentifierAndStatePaged(backups.BACKUP_IDENTIFIER_BOX, backups.BACKUP_STATE_NORMAL, page, perPage));
const [error, result] = await safe(backups.listByIdentifierAndStatePaged(backups.BACKUP_IDENTIFIER_BOX, backups.BACKUP_STATE_NORMAL, page, perPage));
if (error) return next(BoxError.toHttpError(error));
next(new HttpSuccess(200, { backups: result.map(backups.removePrivateFields) }));