diff --git a/api/services/S3Helper.js b/api/services/S3Helper.js index 7ea14040f..3457b2a6d 100644 --- a/api/services/S3Helper.js +++ b/api/services/S3Helper.js @@ -49,6 +49,7 @@ class S3Client { results.push(...page[property]); } } + return results; } @@ -99,9 +100,6 @@ class S3Client { // Concatenate S3 pages until there are enough for OUR page size // eslint-disable-next-line no-restricted-syntax for await (const page of paginator) { - if (!page.Contents) { - break; - } objects.push(...page.Contents); if (objects.length >= totalMaxObjects) { break; diff --git a/api/utils/cfAuthClient.js b/api/utils/cfAuthClient.js index 3dd9417eb..67e2801a4 100644 --- a/api/utils/cfAuthClient.js +++ b/api/utils/cfAuthClient.js @@ -40,8 +40,7 @@ class CloudFoundryAuthClient { response_type: 'token', }).toString(), }) - .then(response => response.data.access_token) - .catch(err => console.error(err)); + .then(response => response.data.access_token); } tokenExpired() { diff --git a/scripts/localstack-setup.js b/scripts/localstack-setup.js index db3b3d549..9e2122fbb 100755 --- a/scripts/localstack-setup.js +++ b/scripts/localstack-setup.js @@ -4,7 +4,6 @@ const { Op } = require('sequelize'); const { Build, - BuildLog, BuildTask, Site, } = require('../api/models'); @@ -21,6 +20,16 @@ const s3 = new S3Client({ }, }); +const fakeIndex = ` +
+