| 1234567891011121314 |
- import { getBackendsFromSupabase } from "@/lib/backends";
- import { NextResponse } from "next/server";
- export async function GET(req: Request) {
- const { searchParams } = new URL(req.url);
- const agentId = searchParams.get("agentId");
- try {
- const backends = await getBackendsFromSupabase(agentId); // pass agentId to your query function
- return NextResponse.json(backends);
- } catch (error) {
- return NextResponse.json({ error: "Unable to fetch backends" }, { status: 500 });
- }
- }
|