5a0f7aa58f
- Create /api/onboard/request-otp and /api/auth/member/login BFF routes - Update OnboardingForm and member-login page to call BFF instead of API directly - Add vercel.json with monorepo build config and rootDirectory hint - Add .vercelignore to exclude .turbo, node_modules, .next (was uploading 2.3GB) - Add apps/web/.gitignore and update root .gitignore for tsbuildinfo files Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
15 lines
544 B
TypeScript
15 lines
544 B
TypeScript
import { getApiBaseUrl, jsonResponse } from '../../../_lib/api';
|
|
|
|
export const dynamic = 'force-dynamic';
|
|
|
|
export async function POST(req: Request): Promise<Response> {
|
|
const body = await req.json().catch(() => ({}));
|
|
const upstream = await fetch(`${getApiBaseUrl()}/public/auth/request-otp`, {
|
|
method: 'POST',
|
|
headers: { 'Content-Type': 'application/json', Accept: 'application/json' },
|
|
body: JSON.stringify(body),
|
|
cache: 'no-store',
|
|
});
|
|
return jsonResponse(await upstream.json().catch(() => ({})), upstream.status);
|
|
}
|