Skip to content

Commit

Permalink
remove reserved dynamodb keyword (#154)
Browse files Browse the repository at this point in the history
* ignore coupon limit checks

* reset reserved keyword
  • Loading branch information
rajranjan0608 authored Jul 22, 2024
1 parent 62862dc commit e3db957
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions CouponService/couponService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,14 @@ export class CouponService {
Key: {
id: couponItem.id,
},
UpdateExpression: 'SET consumedAmount = :consumedAmount, reset = :reset',
UpdateExpression: 'SET consumedAmount = :consumedAmount, #resetBool = :resetBool',
ExpressionAttributeNames: {
// 'reset' is a reserved keyword in DynamoDB
'#resetBool': 'reset'
},
ExpressionAttributeValues: {
':consumedAmount': couponItem.consumedAmount,
':reset': couponItem.reset ?? false,
':resetBool': couponItem.reset ?? false,
},
}

Expand Down

0 comments on commit e3db957

Please sign in to comment.