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.

create notificationPreference

Kiran K2a99c50fdc9b
diff --git a/apps/web/app/api/workspaces/[idOrSlug]/invites/accept/route.ts b/apps/web/app/api/workspaces/[idOrSlug]/invites/accept/route.ts
index 39dc490569..949d3110b5 100644
--- a/apps/web/app/api/workspaces/[idOrSlug]/invites/accept/route.ts
+++ b/apps/web/app/api/workspaces/[idOrSlug]/invites/accept/route.ts
@@ -66,6 +66,9 @@ export const POST = withSession(async ({ session, params }) => {
userId: session.user.id,
role: "member",
projectId: workspace.id,
+ notificationPreference: {
+ create: {},
+ },
},
}),
prisma.projectInvite.delete({
diff --git a/apps/web/app/api/workspaces/route.ts b/apps/web/app/api/workspaces/route.ts
index dafb224164..d83d6843b9 100644
--- a/apps/web/app/api/workspaces/route.ts
+++ b/apps/web/app/api/workspaces/route.ts
@@ -102,6 +102,9 @@ export const POST = withSession(async ({ req, session }) => {
create: {
userId: session.user.id,
role: "owner",
+ notificationPreference: {
+ create: {},
+ },
},
},
billingCycleStart: new Date().getDate(),
diff --git a/apps/web/app/app.dub.co/(auth)/invites/[code]/page.tsx b/apps/web/app/app.dub.co/(auth)/invites/[code]/page.tsx
index 84241bf302..4247d922c3 100644
--- a/apps/web/app/app.dub.co/(auth)/invites/[code]/page.tsx
+++ b/apps/web/app/app.dub.co/(auth)/invites/[code]/page.tsx
@@ -109,6 +109,9 @@ async function VerifyInvite({ code }: { code: string }) {
data: {
userId: session.user.id,
projectId: workspace.id,
+ notificationPreference: {
+ create: {},
+ },
},
});