Skip to content

Open-source status page, incident response and uptime monitoring

fix: create api key action (#821)

Maximilian Kaskee81698d2e24e
diff --git a/apps/web/src/app/app/[workspaceSlug]/(dashboard)/settings/api-token/_components/actions.ts b/apps/web/src/app/app/[workspaceSlug]/(dashboard)/settings/api-token/_components/actions.ts
index 367af7d89..78e2bb47e 100644
--- a/apps/web/src/app/app/[workspaceSlug]/(dashboard)/settings/api-token/_components/actions.ts
+++ b/apps/web/src/app/app/[workspaceSlug]/(dashboard)/settings/api-token/_components/actions.ts
@@ -22,7 +22,7 @@ export async function create(ownerId: number) {
.from(usersToWorkspaces)
.innerJoin(user, eq(user.id, usersToWorkspaces.userId))
.innerJoin(workspace, eq(workspace.id, usersToWorkspaces.workspaceId))
- .where(eq(user.tenantId, session.user.id))
+ .where(eq(user.id, parseInt(session.user.id)))
.all();
const allowedIds = allowedWorkspaces.map((i) => i.workspace.id);