[taskboard] migrate fleet console to nextjs

This commit is contained in:
2026-03-06 14:44:27 -08:00
parent 94e54dc144
commit a765b3d22f
48 changed files with 5483 additions and 790 deletions

17
app/api/wiki/route.ts Normal file
View File

@@ -0,0 +1,17 @@
import { NextResponse } from "next/server";
import { createWikiPage, listWikiPages } from "@/lib/wiki";
export async function GET() {
return NextResponse.json(listWikiPages());
}
export async function POST(request: Request) {
const payload = (await request.json()) as { title?: string };
if (!payload.title) {
return NextResponse.json({ error: "title_is_required" }, { status: 400 });
}
const filename = createWikiPage(payload.title);
return NextResponse.json({ filename, success: true }, { status: 201 });
}