diff --git a/apps/web/app/api/accounts/[id]/qr/route.ts b/apps/web/app/api/accounts/[id]/qr/route.ts new file mode 100644 index 0000000..6dabbf5 --- /dev/null +++ b/apps/web/app/api/accounts/[id]/qr/route.ts @@ -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 }); +} diff --git a/apps/web/app/api/accounts/route.ts b/apps/web/app/api/accounts/route.ts new file mode 100644 index 0000000..fc71ed7 --- /dev/null +++ b/apps/web/app/api/accounts/route.ts @@ -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 }); +}