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:
parent
7fffb9435b
commit
69599db091
|
|
@ -28,15 +28,12 @@ export async function POST(request: Request) {
|
||||||
create: { email: systemEmail, name: `${space}-admin`, did: systemDid },
|
create: { email: systemEmail, name: `${space}-admin`, did: systemDid },
|
||||||
});
|
});
|
||||||
|
|
||||||
const visibility = body.public ? "public" : "public_read";
|
|
||||||
|
|
||||||
const created = await prisma.space.create({
|
const created = await prisma.space.create({
|
||||||
data: {
|
data: {
|
||||||
name: space.charAt(0).toUpperCase() + space.slice(1),
|
name: space.charAt(0).toUpperCase() + space.slice(1),
|
||||||
slug: space,
|
slug: space,
|
||||||
description: body.description || `${space} governance space`,
|
description: body.description || `${space} governance space`,
|
||||||
visibility,
|
isPublic: body.public ?? false,
|
||||||
ownerDid: systemDid,
|
|
||||||
members: {
|
members: {
|
||||||
create: {
|
create: {
|
||||||
userId: user.id,
|
userId: user.id,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue