From 9b180181f2d259eb7ab1723cbe600e3576b741d1 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 17 Oct 2024 11:23:59 +0300 Subject: [PATCH] Update DynamoDbMetadataRepo.ts --- src/modules/terraformPlan/repo/DynamoDbMetadataRepo.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/modules/terraformPlan/repo/DynamoDbMetadataRepo.ts b/src/modules/terraformPlan/repo/DynamoDbMetadataRepo.ts index d9d2f0b..b5771d1 100644 --- a/src/modules/terraformPlan/repo/DynamoDbMetadataRepo.ts +++ b/src/modules/terraformPlan/repo/DynamoDbMetadataRepo.ts @@ -53,14 +53,12 @@ export class DynamoDBMetadataRepo implements IMetadataRepository { IndexName: "commitSHA-index", ScanIndexForward: false }; - let command: QueryCommand + let results : Record[] = [] let response: QueryCommandOutput - let results: Record[] = [] do { - command = new QueryCommand(params); + const command = new QueryCommand(params); response = await this.dynamo.send(command); - if (response.Items && response.Items.length >= 0) { results = results.concat(response.Items) }