Open-source status page, incident response and uptime monitoring
TypeScript alertingincident-managementmcpmcp-servermonitoringmonitoring-as-codeobservabilityon-callopen-sourcesrestatus-pagestatuspagesynthetic-monitoringterraformtinybirdtursouptimeuptime-checkeruptime-monitor
hotfix: clerk webhook
mxkaske200db5ab9f90
diff --git a/packages/api/src/router/clerk/webhook.ts b/packages/api/src/router/clerk/webhook.tsindex 479968271..1c8ffbb46 100644--- a/packages/api/src/router/clerk/webhook.ts+++ b/packages/api/src/router/clerk/webhook.ts@@ -1,5 +1,6 @@import * as z from "zod";+import { eq } from "@openstatus/db";import { user, usersToWorkspaces, workspace } from "@openstatus/db/src/schema";import { createTRPCRouter, publicProcedure } from "../../trpc";@@ -17,7 +18,8 @@ export const webhookRouter = createTRPCRouter({// There's no primary key with drizzle I checked the tennant is not already in the databaseconst alreadyExists = await opts.ctx.db.select({ id: user.id })- .from(user);+ .from(user)+ .where(eq(user.tenantId, opts.input.data.data.id));if (alreadyExists.length) return;