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.

feat: Add createdBy field to token creation API endpoint

Kiran Kd8992444cadd
diff --git a/apps/web/app/api/tokens/route.ts b/apps/web/app/api/tokens/route.ts
index ca176b88db..7f62662c40 100644
--- a/apps/web/app/api/tokens/route.ts
+++ b/apps/web/app/api/tokens/route.ts
@@ -83,6 +83,7 @@ export const POST = withWorkspace(
userId: isMachine ? machineUser?.id! : session.user.id,
projectId: workspace.id,
rateLimit: getCurrentPlan(workspace.plan).limits.api,
+ createdBy: session.user.id,
scopes:
scopes && scopes.length > 0 ? [...new Set(scopes)].join(" ") : null,
},