fix(web-admin): add Next.js proxy route for /api/app/version/check
Fixes QR code not showing on my-org and register pages. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
afc1ae6fbe
commit
4a00baa0e3
|
|
@ -0,0 +1,16 @@
|
|||
import { NextRequest, NextResponse } from 'next/server';
|
||||
|
||||
function getApiBaseUrl(): string {
|
||||
return process.env.API_BASE_URL || 'http://localhost:8000';
|
||||
}
|
||||
|
||||
export async function GET(request: NextRequest) {
|
||||
const url = `${getApiBaseUrl()}/api/app/version/check${request.nextUrl.search}`;
|
||||
try {
|
||||
const res = await fetch(url, { cache: 'no-store' });
|
||||
const data = await res.json();
|
||||
return NextResponse.json(data, { status: res.status });
|
||||
} catch {
|
||||
return NextResponse.json({ error: 'version service unavailable' }, { status: 503 });
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue