Add internal provision endpoint for rSpace Registry
Simple acknowledge endpoint — room created on first user join. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
0801c8ed70
commit
fe9abcc197
|
|
@ -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).
|
||||
*
|
||||
* rmaps uses client-side rooms keyed by space slug.
|
||||
* Acknowledges provisioning; room is created when users join.
|
||||
*/
|
||||
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: "rmaps space acknowledged, room created on first join" });
|
||||
}
|
||||
Loading…
Reference in New Issue