This commit is contained in:
2025-12-25 23:49:47 -07:00
parent 13821cbcd5
commit 0d608cf3f4
26 changed files with 7 additions and 94 deletions

View File

@@ -18,7 +18,6 @@ export const POST: APIRoute = async ({ request, locals, redirect }) => {
return new Response('Name is required', { status: 400 });
}
// Get user's first organization
const userOrg = await db.select()
.from(members)
.where(eq(members.userId, user.id))
@@ -28,7 +27,6 @@ export const POST: APIRoute = async ({ request, locals, redirect }) => {
return new Response('No organization found', { status: 400 });
}
// Create client
await db.insert(clients).values({
id: nanoid(),
organizationId: userOrg.organizationId,