diff --git a/services/mam-api/src/routes/assets.js b/services/mam-api/src/routes/assets.js index 0459e72..890a03e 100644 --- a/services/mam-api/src/routes/assets.js +++ b/services/mam-api/src/routes/assets.js @@ -30,6 +30,7 @@ router.get('/', async (req, res, next) => { media_type, limit = 50, offset = 0, + include_archived, } = req.query; let query = ` @@ -41,6 +42,12 @@ router.get('/', async (req, res, next) => { const params = []; let paramCount = 1; + // Hide archived rows unless explicitly asked for, or unless the caller is + // already filtering by status=archived. + if (!status && include_archived !== 'true') { + query += ` AND a.status <> 'archived'`; + } + if (project_id) { query += ` AND a.project_id = $${paramCount++}`; params.push(project_id); diff --git a/services/web-ui/public/capture.html b/services/web-ui/public/capture.html index eb3c9ea..b61892c 100644 --- a/services/web-ui/public/capture.html +++ b/services/web-ui/public/capture.html @@ -312,7 +312,7 @@
- + + + + +