Skip to content

Commit

Permalink
lambdas: Use updateItem rather that putItem
Browse files Browse the repository at this point in the history
  • Loading branch information
TomNuttall committed Dec 3, 2024
1 parent aaaced6 commit 7b344d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/lambdas/onSend/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DynamoDBClient, PutItemCommand } from '@aws-sdk/client-dynamodb'
import { DynamoDBClient, UpdateItemCommand } from '@aws-sdk/client-dynamodb'

const { CONNECTIONS_TABLE_NAME } = process.env
const ddbClient = new DynamoDBClient()
Expand All @@ -8,7 +8,7 @@ const handler = async (event) => {
const gameId = 'testing'

const { data } = JSON.parse(event.body)
const command = new PutItemCommand({
const command = new UpdateItemCommand({
TableName: CONNECTIONS_TABLE_NAME,
Item: {
gameId: { S: gameId },
Expand Down

0 comments on commit 7b344d1

Please sign in to comment.