screwdriver-api 8.0.4 → 8.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "screwdriver-api",
3
- "version": "8.0.4",
3
+ "version": "8.0.6",
4
4
  "description": "API server for the Screwdriver.cd service",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -23,7 +23,7 @@ module.exports = () => ({
23
23
  },
24
24
  handler: async (request, h) => {
25
25
  const { bannerFactory } = request.server.app;
26
- const { scope } = request.query;
26
+ const { scope, isActive } = request.query;
27
27
 
28
28
  if (scope !== 'GLOBAL') {
29
29
  if (!request.auth.isAuthenticated) {
@@ -31,6 +31,10 @@ module.exports = () => ({
31
31
  }
32
32
  }
33
33
 
34
+ if (isActive !== undefined) {
35
+ request.query.isActive = ['true', true, '1', 1].includes(isActive);
36
+ }
37
+
34
38
  // list params defaults to empty object in models if undefined
35
39
  return bannerFactory
36
40
  .list({ params: request.query })