From 3cd4fd3c73a07d2341269dea831786ff76b66f6f Mon Sep 17 00:00:00 2001 From: Guy Pavlov Date: Wed, 17 Apr 2024 12:25:25 -0400 Subject: [PATCH] Update amplify/data/increment-like.js syntax The correct DynamoDB syntax requires semicolon in both expression and expressionValues --- .../gen2/build-a-backend/data/custom-business-logic/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/gen2/build-a-backend/data/custom-business-logic/index.mdx b/src/pages/gen2/build-a-backend/data/custom-business-logic/index.mdx index 575b7f9a467..ee37a2a9775 100644 --- a/src/pages/gen2/build-a-backend/data/custom-business-logic/index.mdx +++ b/src/pages/gen2/build-a-backend/data/custom-business-logic/index.mdx @@ -222,7 +222,7 @@ export function request(ctx) { key: util.dynamodb.toMapValues({ id: ctx.args.postId}), update: { expression: 'ADD likes :plusOne', - expressionValues: { 'plusOne': { N: 1 } }, + expressionValues: { ':plusOne': { N: 1 } }, } } }