nomadro/src/app/api/public/v1/hub/join/route.ts
Eric 1058eca8af Wire Hub API aliases, Next proxy, and .com admin cn lane for /hub.
Include hub Next API routes and admin module select so the China-only Hub ship can build and mount on nomadro.com.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-29 00:03:33 +08:00

25 lines
638 B
TypeScript

import { NextRequest } from "next/server";
import { PUBLIC_JOIN } from "~/lib/public-api/catalog";
import {
assertPublicKey,
jsonOk,
optionsOk,
} from "~/lib/public-api/http";
export async function OPTIONS(req: NextRequest) {
return optionsOk(req);
}
export async function GET(req: NextRequest) {
const denied = assertPublicKey(req);
if (denied) return denied;
const email = req.nextUrl.searchParams.get("email") || "";
return jsonOk(req, {
ok: true,
...PUBLIC_JOIN,
email: email || null,
isMember: false,
note: "Paid social join is isolated from VIP (__vip__). Prefer handoff to pagePath.",
});
}