The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
limit waituntil
Steven Teye8d3427fbf8d
diff --git a/apps/web/app/api/workspaces/[idOrSlug]/route.ts b/apps/web/app/api/workspaces/[idOrSlug]/route.tsindex 84cb43cce9..e62a5211a5 100644--- a/apps/web/app/api/workspaces/[idOrSlug]/route.ts+++ b/apps/web/app/api/workspaces/[idOrSlug]/route.ts@@ -7,7 +7,6 @@ import {WorkspaceSchema,updateWorkspaceSchema,} from "@/lib/zod/schemas/workspaces";-import { waitUntil } from "@vercel/functions";import { NextResponse } from "next/server";// GET /api/workspaces/[idOrSlug] – get a specific workspace by id or slug@@ -62,26 +61,23 @@ export const PATCH = withWorkspace(},});- waitUntil(- (async () => {- if (slug !== workspace.slug) {- await prisma.user.updateMany({- where: {- defaultWorkspace: workspace.slug,- },- data: {- defaultWorkspace: slug,- },- });-- // SOON: update the workspace's referral link to use the new slug- // await dub.links.update(`ext_ws_${workspace.id}`, {- // key: slug,- // });- }- })(),- );+ if (slug !== workspace.slug) {+ await prisma.user.updateMany({+ where: {+ defaultWorkspace: workspace.slug,+ },+ data: {+ defaultWorkspace: slug,+ },+ });+ // SOON: update the workspace's referral link to use the new slug+ // waitUntil(+ // await dub.links.update(`ext_ws_${workspace.id}`, {+ // key: slug,+ // }),+ // );+ }return NextResponse.json(WorkspaceSchema.parse({...response,