feat: 首次推送到Gitea - 完整项目代码 + 安全加固 + 知识库

This commit is contained in:
ZhuiGuangAI Dev
2026-10-02 18:52:49 +08:00
parent b44601bb66
commit 8205ae709c
1185 changed files with 49841 additions and 12802 deletions
@@ -1,6 +1,10 @@
import { NextResponse } from "next/server";
import { prisma } from "@/lib/prisma";
import { requireAdmin } from "@/lib/admin-auth";
import { badRequest, notFound, serverError } from "@/lib/api-error";
export const dynamic = "force-dynamic";
function generateSlug(name: string): string {
return name
@@ -79,8 +83,9 @@ export async function POST(
toolId,
message: "发布成功",
});
} catch (error: unknown) {
const err = error as { message?: string };
return NextResponse.json({ error: err.message }, { status: 500 });
} catch (error) {
return serverError(error);
}
}