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.

getCurrentPlan

Steven Teyddeebad043f8
diff --git a/apps/web/app/api/oauth/token/exchange-code-for-token.ts b/apps/web/app/api/oauth/token/exchange-code-for-token.ts
index 6604b202e5..c9dda46b66 100644
--- a/apps/web/app/api/oauth/token/exchange-code-for-token.ts
+++ b/apps/web/app/api/oauth/token/exchange-code-for-token.ts
@@ -7,7 +7,7 @@ import { generateRandomName } from "@/lib/names";
import z from "@/lib/zod";
import { authCodeExchangeSchema } from "@/lib/zod/schemas/oauth";
import { prisma } from "@dub/prisma";
-import { getPlanDetails } from "@dub/utils";
+import { getCurrentPlan } from "@dub/utils";
import { waitUntil } from "@vercel/functions";
import { NextRequest } from "next/server";
@@ -232,7 +232,7 @@ export const exchangeAuthCodeForToken = async (
await prisma.restrictedToken.update({
where: { id: restrictedToken.id },
data: {
- rateLimit: getPlanDetails(project.plan).limits.api,
+ rateLimit: getCurrentPlan(project.plan).limits.api,
},
});
}),