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 <noreply@anthropic.com>
This commit is contained in:
Jeff Emmett 2026-02-25 00:48:19 -08:00
parent 7fffb9435b
commit 69599db091
1 changed files with 1 additions and 4 deletions

View File

@ -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,