feat: 大量优化和bug修复

This commit is contained in:
2026-05-23 22:23:29 +08:00
parent 92b063c4c4
commit fc71e924e7
39 changed files with 1381 additions and 302 deletions
+3 -19
View File
@@ -1,20 +1,4 @@
// server/api/health.get.ts - 服务健康检查接口
import { apiOk } from "~~/server/utils/response";
import { SERVICE_VERSION } from "~~/server/utils/runtimeState";
import { getSysConfig } from "~~/server/utils/sysConfig";
/**
* 健康检查不需要鉴权
*
* 这个接口用于部署平台、Docker healthcheck 或人工确认服务是否启动;
* 返回模型名,但不返回 API Key、baseURL 或其他敏感配置
*/
export default defineEventHandler(async () => {
const cfg = await getSysConfig();
return apiOk({
status: "ok" as const,
message: "AI题库服务运行正常",
version: SERVICE_VERSION,
model: cfg.openAiModel
});
// server/api/health.get.ts - 服务健康检查接口,无需鉴权
export default defineEventHandler(() => {
return { status: "ok" };
});