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.

Quick tweaks

Tim Wilson08f7965a928a
diff --git a/apps/web/prisma/schema/domain.prisma b/apps/web/prisma/schema/domain.prisma
index fef347962a..750e1d37e3 100644
--- a/apps/web/prisma/schema/domain.prisma
+++ b/apps/web/prisma/schema/domain.prisma
@@ -27,6 +27,10 @@ model RegisteredDomain {
updatedAt DateTime @updatedAt
expiresAt DateTime
+ project Project @relation(fields: [projectId], references: [id])
+ projectId String
+ domain Domain? @relation(fields: [domainId], references: [id], onDelete: SetNull)
+ domainId String? @unique
@@index(projectId)
@@index(expiresAt(sort: Asc))
diff --git a/apps/web/ui/domains/register-domain-form.tsx b/apps/web/ui/domains/register-domain-form.tsx
index 5ea2ed271d..06abee3a89 100644
--- a/apps/web/ui/domains/register-domain-form.tsx
+++ b/apps/web/ui/domains/register-domain-form.tsx
@@ -107,7 +107,8 @@ export function RegisterDomainForm({
mutate(
(key) =>
typeof key === "string" &&
- key.startsWith(`/api/domains?workspaceId=${workspace.id}`),
+ (key.startsWith(`/api/domains?workspaceId=${workspace.id}`) ||
+ key.startsWith(`/api/domains/count?workspaceId=${workspace.id}`)),
),
mutate(
(key) => typeof key === "string" && key.startsWith("/api/links"),