12 lines
298 B
TypeScript
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 });
|
|
}
|
|
}
|