backups: make listing by site only return box backups
This commit is contained in:
+1
-1
@@ -201,7 +201,7 @@ async function listBySiteId(siteId, page, perPage) {
|
||||
assert(typeof page === 'number' && page > 0);
|
||||
assert(typeof perPage === 'number' && perPage > 0);
|
||||
|
||||
const results = await database.query(`SELECT ${BACKUPS_FIELDS} FROM backups WHERE siteId=? ORDER BY creationTime DESC LIMIT ?,?`, [ siteId, (page-1)*perPage, perPage ]);
|
||||
const results = await database.query(`SELECT ${BACKUPS_FIELDS} FROM backups WHERE siteId=? AND type=? ORDER BY creationTime DESC LIMIT ?,?`, [ siteId, exports.BACKUP_TYPE_BOX, (page-1)*perPage, perPage ]);
|
||||
|
||||
results.forEach(function (result) { postProcess(result); });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user