In the storeWebhookEvent function in src/app/actions.ts, the following code is used:
const returnedValue = await db
.insert(webhookEvents)
.values({
id,
eventName,
processed: false,
body,
})
.onConflictDoNothing({ target: plans.id })
.returning();
Currently, the insert is being made to webhookEvents, but the target of onConflictDoNothing is set to plans.id. Since there is no foreign key relationship between webhookEvents and plans, using plans.id as the target seems incorrect. Shouldn't it be webhookEvents.id instead?