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.

format

Kiran K1717136f09f9
diff --git a/apps/web/lib/auth/workspace-edge.ts b/apps/web/lib/auth/workspace-edge.ts
index b68253f4d1..7b8e6fdf12 100644
--- a/apps/web/lib/auth/workspace-edge.ts
+++ b/apps/web/lib/auth/workspace-edge.ts
@@ -204,8 +204,8 @@ export const withWorkspaceEdge = (
},
})) as WorkspaceProps;
+ // workspace doesn't exist
if (!workspace || !workspace.users) {
- // workspace doesn't exist
throw new DubApiError({
code: "not_found",
message: "Workspace not found.",
diff --git a/apps/web/lib/auth/workspace.ts b/apps/web/lib/auth/workspace.ts
index 878c065f35..002f0c691b 100644
--- a/apps/web/lib/auth/workspace.ts
+++ b/apps/web/lib/auth/workspace.ts
@@ -196,7 +196,7 @@ export const withWorkspace = (
}
}
- let workspace = (await prisma.project.findUnique({
+ const workspace = (await prisma.project.findUnique({
where: {
id: workspaceId || undefined,
slug: workspaceSlug || undefined,