Add internal provision endpoint for rSpace Registry

Simple acknowledge endpoint — no DB to provision.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jeff Emmett 2026-02-25 00:30:15 -08:00
parent 3997ab2fa2
commit 0e4d1de7ce
1 changed files with 17 additions and 0 deletions

View File

@ -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).
*
* rtube stores videos in R2 buckets keyed by space slug.
* Acknowledges provisioning; bucket is created on first upload.
*/
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: "rtube space acknowledged, bucket created on first upload" });
}