The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Update API description and support URL
Kiran Kbced19c0d80a
diff --git a/apps/web/app/api/projects/[slug]/users/route.ts b/apps/web/app/api/projects/[slug]/users/route.tsindex 8b88963960..9435fc428a 100644--- a/apps/web/app/api/projects/[slug]/users/route.ts+++ b/apps/web/app/api/projects/[slug]/users/route.ts@@ -70,7 +70,7 @@ export const PUT = withAuth(// DELETE /api/projects/[slug]/users – remove a user from a projectexport const DELETE = withAuth(- async ({ searchParams, project }) => {+ async ({ searchParams, project, session }) => {const { userId } = removeUserSchema.parse(searchParams);const projectUser = await prisma.projectUsers.findUnique({where: {@@ -89,7 +89,7 @@ export const DELETE = withAuth(message: "User not found",});}- if (projectUser.role === "owner") {+ if (projectUser.role === "owner" && userId === session.user.id) {throw new DubApiError({code: "bad_request",message:diff --git a/apps/web/lib/openapi/index.ts b/apps/web/lib/openapi/index.tsindex 5516ffdb46..de156bd1fe 100644--- a/apps/web/lib/openapi/index.ts+++ b/apps/web/lib/openapi/index.ts@@ -14,12 +14,12 @@ export const openApiObject: ZodOpenApiObject = {info: {title: "Dub.co API",description:- "Dub is an open-source link management tool for modern marketing teams to create, share, and track short links.",+ "Dub is link management infrastructure for companies to create marketing campaigns, link sharing features, and referral programs.",version: "0.0.1",contact: {name: "Dub.co Support",email: "[email protected]",- url: "https://dub.co/help",+ url: "https://dub.co/api",},license: {name: "AGPL-3.0 license",