From b924c547c928c02c5d6cccec6e91593c035ffc72 Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Wed, 25 Feb 2026 00:30:20 -0800 Subject: [PATCH] Add internal provision endpoint for rSpace Registry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Simple acknowledge endpoint — calendars associated in future. Co-Authored-By: Claude Opus 4.6 --- src/app/api/internal/provision/route.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/app/api/internal/provision/route.ts diff --git a/src/app/api/internal/provision/route.ts b/src/app/api/internal/provision/route.ts new file mode 100644 index 0000000..5f2901a --- /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). + * + * rcal will associate calendars with space slugs in future. + * Acknowledges provisioning for now. + */ +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: "rcal space acknowledged" }); +}