remove need for index from dynamo connector

This commit is contained in:
Martin McKeaveney 2022-01-26 15:25:11 +01:00
parent 311b7ef32f
commit c316306078
1 changed files with 4 additions and 6 deletions

View File

@ -169,13 +169,11 @@ module DynamoModule {
IndexName: query.index ? query.index : undefined, IndexName: query.index ? query.index : undefined,
...query.json, ...query.json,
} }
if (query.index) { const response = await this.client.query(params).promise()
const response = await this.client.query(params).promise() if (response.Items) {
if (response.Items) { return response.Items
return response.Items
}
return response
} }
return response
} }
async scan(query: { table: string; json: object; index: null | string }) { async scan(query: { table: string; json: object; index: null | string }) {