The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
revert dub workspace id
Pedro Ladeirad3e0a4f840c1
diff --git a/apps/web/lib/auth/admin.ts b/apps/web/lib/auth/admin.tsindex 639b3ab66c..5127faafd0 100644--- a/apps/web/lib/auth/admin.ts+++ b/apps/web/lib/auth/admin.ts@@ -1,5 +1,5 @@import { prisma } from "@/lib/prisma";-import { getSearchParams } from "@dub/utils";+import { DUB_WORKSPACE_ID, getSearchParams } from "@dub/utils";import { WorkspaceRole } from "@prisma/client";import { getSession, type Session } from "./utils";@@ -23,8 +23,7 @@ export const getDubAdminRole = async (userId: string) => {where: {userId_projectId: {userId,- projectId: "ws_1KETZ919F83ZJH6A80HWEHW6E",- // projectId: DUB_WORKSPACE_ID,+ projectId: DUB_WORKSPACE_ID,},},select: {diff --git a/apps/web/lib/middleware/admin.ts b/apps/web/lib/middleware/admin.tsindex d90127caa9..a06278046d 100644--- a/apps/web/lib/middleware/admin.ts+++ b/apps/web/lib/middleware/admin.ts@@ -1,4 +1,5 @@import { prismaEdge } from "@/lib/prisma/edge";+import { DUB_WORKSPACE_ID } from "@dub/utils";import { NextRequest, NextResponse } from "next/server";import { getUserViaToken } from "./utils/get-user-via-token";import { parse } from "./utils/parse";@@ -15,8 +16,7 @@ export async function AdminMiddleware(req: NextRequest) {where: {userId_projectId: {userId: user.id,- projectId: "ws_1KETZ919F83ZJH6A80HWEHW6E",- // projectId: DUB_WORKSPACE_ID,+ projectId: DUB_WORKSPACE_ID,},},});