Files
zk-data-agent/frontend/app/app/api/annotations/route.ts
T
2026-07-20 10:56:59 +08:00

22 lines
523 B
TypeScript

import { listAnnotationPages } from "@/lib/annotation-pages";
export const runtime = "nodejs";
export const dynamic = "force-dynamic";
export async function GET() {
try {
const items = await listAnnotationPages();
return Response.json(
{ items },
{ headers: { "cache-control": "no-store" } },
);
} catch (error) {
return Response.json(
{
error: error instanceof Error ? error.message : "无法读取标注页面目录",
},
{ status: 500, headers: { "cache-control": "no-store" } },
);
}
}