Rename getByIdentifierAndStatePaged to listByIdentifierAndStatePaged
This commit is contained in:
@@ -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) }));
|
||||
|
||||
Reference in New Issue
Block a user