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.

missed some more spots

Steven Tey7dd9aa09ed5c
diff --git a/apps/web/app/api/scim/v2.0/[...directory]/route.ts b/apps/web/app/api/scim/v2.0/[...directory]/route.ts
index 62722c4a27..f4a216b6ad 100644
--- a/apps/web/app/api/scim/v2.0/[...directory]/route.ts
+++ b/apps/web/app/api/scim/v2.0/[...directory]/route.ts
@@ -58,13 +58,13 @@ export { handler as DELETE, handler as GET, handler as POST, handler as PUT };
const handleEvents = async (event: DirectorySyncEvent) => {
const { event: action, tenant: projectId, data } = event;
- const project = (await prisma.project.findUnique({
+ const workspace = (await prisma.project.findUnique({
where: {
id: projectId,
},
})) as unknown as WorkspaceProps;
- if (!project || project.plan !== "enterprise" || !("email" in data)) {
+ if (!workspace || workspace.plan !== "enterprise" || !("email" in data)) {
return;
}
@@ -93,7 +93,7 @@ const handleEvents = async (event: DirectorySyncEvent) => {
if (action === "user.created" && !userInProject && !userInvited) {
await inviteUser({
email: data.email,
- project,
+ workspace,
});
}
@@ -106,7 +106,7 @@ const handleEvents = async (event: DirectorySyncEvent) => {
if (!userInProject && !userInvited) {
await inviteUser({
email: data.email,
- project,
+ workspace,
});
}
}
diff --git a/apps/web/app/api/workspaces/[idOrSlug]/invites/reset/route.ts b/apps/web/app/api/workspaces/[idOrSlug]/invites/reset/route.ts
index 1eb2aa3172..9b86d98f1b 100644
--- a/apps/web/app/api/workspaces/[idOrSlug]/invites/reset/route.ts
+++ b/apps/web/app/api/workspaces/[idOrSlug]/invites/reset/route.ts
@@ -7,7 +7,7 @@ export const POST = withAuth(
async ({ workspace }) => {
const response = await prisma.project.update({
where: {
- id: project.id,
+ id: workspace.id,
},
data: {
inviteCode: nanoid(24),