The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
edited withProjectAuth to use project.ownerExceededUsage
Steven Teya4d501bc107f
diff --git a/lib/auth.ts b/lib/auth.tsindex 5120ca9492..c0feda3608 100644--- a/lib/auth.ts+++ b/lib/auth.ts@@ -103,8 +103,8 @@ const withProjectAuth =usageLimit: true,},})) as UsageProps;- const exceededUsage = user.usage >= user.usageLimit;- if (needNotExceededUsage && exceededUsage) {++ if (needNotExceededUsage && project.ownerExceededUsage) {return res.status(403).end("Unauthorized: Usage limits exceeded.");}