Skip to content

Commit e8c7323

Browse files
committed
do not modify existing events in POST if we somehow have UUID collision
1 parent f7a2fd5 commit e8c7323

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/api/routes/events.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,7 @@ const eventsPlugin: FastifyPluginAsyncZodOpenApi = async (
479479
await fastify.dynamoClient.send(
480480
new PutItemCommand({
481481
TableName: genericConfig.EventsDynamoTableName,
482+
ConditionExpression: "attribute_not_exists(id)",
482483
Item: marshall(entry, { removeUndefinedValues: true }),
483484
}),
484485
);

0 commit comments

Comments
 (0)