import { NextResponse } from "next/server";
const COMMUNITY_URL = process.env.COMMUNITY_URL || process.env.UMMAHID_URL || "http://ummahid:3000";
export async function GET() {
  try {
    const r = await fetch(`${COMMUNITY_URL}/api/v2/waqf/pools`);
    return NextResponse.json(await r.json(), { status: r.status });
  } catch (e) { return NextResponse.json({ error:"Failed" }, { status:502 }); }
}