Browse Source

remove need for index from dynamo connector

pull/4434/head
Martin McKeaveney 5 years ago
parent
commit
1e179fec76
  1. 10
      packages/server/src/integrations/dynamodb.ts

10
packages/server/src/integrations/dynamodb.ts

@ -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 }) {

Loading…
Cancel
Save