remove need for index from dynamo connector

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

View File

@ -169,14 +169,12 @@ 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
}
}
async scan(query: { table: string; json: object; index: null | string }) {
const params = {