rmesh-online/src/app/api/mesh/nodes/route.ts

12 lines
298 B
TypeScript

import { NextResponse } from "next/server";
import { getMeshNodes } from "@/lib/mesh-client";
export async function GET() {
try {
const data = await getMeshNodes();
return NextResponse.json(data);
} catch {
return NextResponse.json({ nodes: [], total: 0 }, { status: 503 });
}
}