import { NextResponse } from "next/server"; const GATEWAY = process.env.HERMES_GATEWAY_URL || "http://127.0.0.1:8642"; export async function GET() { try { const res = await fetch(GATEWAY + "/api/jobs"); const data = await res.text(); return new NextResponse(data, { status: res.status, headers: { "content-type": "application/json" }, }); } catch { return NextResponse.json({ jobs: [] }, { status: 502 }); } }