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
+10 -7
View File
@@ -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";
export async function GET() {
try {
@@ -37,9 +41,8 @@ export async function GET() {
});
return NextResponse.json({ tasks: merged });
} catch (error: unknown) {
const err = error as { message?: string };
return NextResponse.json({ error: err.message }, { status: 500 });
} catch (error) {
return serverError(error);
}
}
@@ -95,8 +98,8 @@ export async function PUT(request: Request) {
}
return NextResponse.json({ task: result });
} catch (error: unknown) {
const err = error as { message?: string };
return NextResponse.json({ error: err.message }, { status: 500 });
} catch (error) {
return serverError(error);
}
}
}