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.

simplify getWorkspace

Steven Teyb033571a4382
diff --git a/apps/web/lib/auth/workspace.ts b/apps/web/lib/auth/workspace.ts
index 4371d41088..cc4fe175b0 100644
--- a/apps/web/lib/auth/workspace.ts
+++ b/apps/web/lib/auth/workspace.ts
@@ -201,26 +201,7 @@ export const withWorkspace = (
id: id || undefined,
slug: slug || undefined,
},
- select: {
- id: true,
- name: true,
- slug: true,
- logo: true,
- usage: true,
- aiUsage: true,
- aiLimit: true,
- usageLimit: true,
- linksUsage: true,
- linksLimit: true,
- domainsLimit: true,
- tagsLimit: true,
- usersLimit: true,
- plan: true,
- stripeId: true,
- billingCycleStart: true,
- createdAt: true,
- updatedAt: true,
- monitoringId: true,
+ include: {
users: {
where: {
userId: session.user.id,
@@ -235,7 +216,6 @@ export const withWorkspace = (
primary: true,
},
},
- inviteCode: true,
},
}),
linkId