diff --git a/src/app/api/internal/provision/route.ts b/src/app/api/internal/provision/route.ts new file mode 100644 index 0000000..c34d801 --- /dev/null +++ b/src/app/api/internal/provision/route.ts @@ -0,0 +1,17 @@ +import { NextResponse } from "next/server"; + +/** + * Internal provision endpoint — called by rSpace Registry when activating + * this app for a space. No auth required (only reachable from Docker network). + * + * rsocials manages social feeds per space slug. + * Acknowledges provisioning; feed is created on first post. + */ +export async function POST(request: Request) { + const body = await request.json(); + const space: string = body.space?.trim(); + if (!space) { + return NextResponse.json({ error: "Missing space name" }, { status: 400 }); + } + return NextResponse.json({ status: "ok", space, message: "rsocials space acknowledged" }); +}