Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

source -> receiver

Kiran K5d979d2a20ee
diff --git a/apps/web/app/api/webhooks/route.ts b/apps/web/app/api/webhooks/route.ts
index 7e508ccebf..a0133ca503 100644
--- a/apps/web/app/api/webhooks/route.ts
+++ b/apps/web/app/api/webhooks/route.ts
@@ -38,7 +38,7 @@ export const POST = withWorkspace(
secret,
triggers,
projectId: workspace.id,
- source: "user",
+ receiver: "user",
},
});
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/layout-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/layout-client.tsx
index 22315dc4bc..5e7a8f6d88 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/layout-client.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/layout-client.tsx
@@ -93,6 +93,15 @@ export default function WorkspaceSettingsLayoutClient({
},
]
: []),
+ ...(flags?.webhooks
+ ? [
+ {
+ name: "Webhooks",
+ icon: Key,
+ segment: "webhooks",
+ },
+ ]
+ : []),
],
},
diff --git a/apps/web/prisma/schema/webhook.prisma b/apps/web/prisma/schema/webhook.prisma
index f68ddbc9f1..b1dfcf3c55 100644
--- a/apps/web/prisma/schema/webhook.prisma
+++ b/apps/web/prisma/schema/webhook.prisma
@@ -1,20 +1,20 @@
-enum WebhookSource {
+enum WebhookReceiver {
user
zapier
make
}
model Webhook {
- id String @id @default(cuid())
- source WebhookSource
+ id String @id @default(cuid())
+ receiver WebhookReceiver
projectId String
linkId String?
name String
url String
secret String
triggers Json
- createdAt DateTime @default(now())
- updatedAt DateTime @updatedAt
+ createdAt DateTime @default(now())
+ updatedAt DateTime @updatedAt
Project Project @relation(fields: [projectId], references: [id], onDelete: Cascade)
Link Link? @relation(fields: [linkId], references: [id], onDelete: Cascade)