1.0.0
This commit is contained in:
@@ -16,14 +16,12 @@ export const POST: APIRoute = async ({ request, locals, redirect }) => {
|
||||
return new Response('Name is required', { status: 400 });
|
||||
}
|
||||
|
||||
// Create organization
|
||||
const orgId = nanoid();
|
||||
await db.insert(organizations).values({
|
||||
id: orgId,
|
||||
name,
|
||||
});
|
||||
|
||||
// Add user as owner
|
||||
await db.insert(members).values({
|
||||
userId: user.id,
|
||||
organizationId: orgId,
|
||||
|
||||
Reference in New Issue
Block a user