feat: add Next.js proxy routes for accounts list and QR endpoints

This commit is contained in:
2026-05-29 11:37:48 +05:30
parent 1dba77959d
commit 759b49159e
2 changed files with 13 additions and 0 deletions
@@ -0,0 +1,7 @@
const API_URL = process.env.API_URL ?? 'http://localhost:3001';
export async function GET(_req: Request, { params }: { params: Promise<{ id: string }> }) {
const { id } = await params;
const res = await fetch(`${API_URL}/accounts/${id}/qr`, { cache: 'no-store' });
return Response.json(await res.json(), { status: res.status });
}
+6
View File
@@ -0,0 +1,6 @@
const API_URL = process.env.API_URL ?? 'http://localhost:3001';
export async function GET() {
const res = await fetch(`${API_URL}/accounts`, { cache: 'no-store' });
return Response.json(await res.json(), { status: res.status });
}