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.

Update route.ts

Steven Tey1b72115dcdf9
diff --git a/apps/web/app/api/workspaces/[idOrSlug]/exists/route.ts b/apps/web/app/api/workspaces/[idOrSlug]/exists/route.ts
index 6667aba4a0..557a1dc121 100644
--- a/apps/web/app/api/workspaces/[idOrSlug]/exists/route.ts
+++ b/apps/web/app/api/workspaces/[idOrSlug]/exists/route.ts
@@ -6,13 +6,13 @@ import { NextResponse } from "next/server";
// GET /api/workspaces/[idOrSlug]/exists – check if a project exists
export const GET = withSession(async ({ params }) => {
- const { idOrSlug } = params;
- if ((await isReservedKey(idOrSlug)) || DEFAULT_REDIRECTS[idOrSlug]) {
+ const { idOrSlug: slug } = params;
+ if ((await isReservedKey(slug)) || DEFAULT_REDIRECTS[slug]) {
return NextResponse.json(1);
}
const project = await prisma.project.findUnique({
where: {
- slug: idOrSlug
+ slug,
},
select: {
slug: true,