From 1e179fec765f7e6de7fdaa71a91b034d4b175705 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Wed, 26 Jan 2022 15:25:11 +0100 Subject: [PATCH] remove need for index from dynamo connector --- packages/server/src/integrations/dynamodb.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/server/src/integrations/dynamodb.ts b/packages/server/src/integrations/dynamodb.ts index bfcac3184d..841dd6ff0d 100644 --- a/packages/server/src/integrations/dynamodb.ts +++ b/packages/server/src/integrations/dynamodb.ts @@ -169,13 +169,11 @@ module DynamoModule { IndexName: query.index ? query.index : undefined, ...query.json, } - if (query.index) { - const response = await this.client.query(params).promise() - if (response.Items) { - return response.Items - } - return response + const response = await this.client.query(params).promise() + if (response.Items) { + return response.Items } + return response } async scan(query: { table: string; json: object; index: null | string }) {