Skip to content

Commit 8545825

Browse files
Update internal/datastore/src/letter-repository.ts
Update to more modern syntax Co-authored-by: Francisco Videira <[email protected]>
1 parent 1fe5ffc commit 8545825

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

internal/datastore/src/letter-repository.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,8 @@ export class LetterRepository {
7575
const result = await this.ddbClient.send(new QueryCommand({
7676
TableName: this.config.lettersTableName,
7777
IndexName: 'supplierStatus-index',
78-
KeyConditions: {
79-
supplierStatus: {
80-
ComparisonOperator: 'EQ',
81-
AttributeValueList: [`${supplierId}#${status}`]
82-
}
83-
},
78+
KeyConditionExpression: 'supplierStatus = :supplierStatus',
79+
ExpressionAttributeValues: { ':supplierStatus': `${supplierId}#${status}` },
8480
Limit: extendedOptions.pageSize,
8581
ExclusiveStartKey: extendedOptions.exclusiveStartKey
8682
}));

0 commit comments

Comments
 (0)