From 69599db091f5b58dcb53d35a3ee3b8f6aac96d16 Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Wed, 25 Feb 2026 00:48:19 -0800 Subject: [PATCH] fix: use isPublic instead of visibility in provision endpoint The DB schema has isPublic (boolean) not visibility (string). The Prisma schema was updated but never migrated. Co-Authored-By: Claude Opus 4.6 --- src/app/api/internal/provision/route.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/app/api/internal/provision/route.ts b/src/app/api/internal/provision/route.ts index d76adf4..5340448 100644 --- a/src/app/api/internal/provision/route.ts +++ b/src/app/api/internal/provision/route.ts @@ -28,15 +28,12 @@ export async function POST(request: Request) { create: { email: systemEmail, name: `${space}-admin`, did: systemDid }, }); - const visibility = body.public ? "public" : "public_read"; - const created = await prisma.space.create({ data: { name: space.charAt(0).toUpperCase() + space.slice(1), slug: space, description: body.description || `${space} governance space`, - visibility, - ownerDid: systemDid, + isPublic: body.public ?? false, members: { create: { userId: user.id,