backups: query using identifier instead of type

this allows us to move the enums into backups.js instead of backupdb.js
This commit is contained in:
Girish Ramakrishnan
2020-06-14 12:19:51 -07:00
parent 4f964101a0
commit f6cb1a0863
6 changed files with 63 additions and 72 deletions
+1 -1
View File
@@ -1925,7 +1925,7 @@ function listBackups(app, page, perPage, callback) {
assert(typeof perPage === 'number' && perPage > 0);
assert.strictEqual(typeof callback, 'function');
backups.getByAppIdPaged(page, perPage, app.id, function (error, results) {
backups.getByIdentifierAndStatePaged(app.id, backups.BACKUP_STATE_NORMAL, page, perPage, function (error, results) {
if (error) return callback(error);
callback(null, results);