feat: 接口统一优化
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
// server/api/health.get.ts - 服务健康检查接口
|
||||
import { serverEnv } from "~~/server/utils/env";
|
||||
import { apiOk } from "~~/server/utils/response";
|
||||
import { SERVICE_VERSION } from "~~/server/utils/runtimeState";
|
||||
|
||||
/**
|
||||
@@ -9,10 +10,10 @@ import { SERVICE_VERSION } from "~~/server/utils/runtimeState";
|
||||
* 返回模型名,但不返回 API Key、baseURL 或其他敏感配置
|
||||
*/
|
||||
export default defineEventHandler(() => {
|
||||
return {
|
||||
status: "ok",
|
||||
return apiOk({
|
||||
status: "ok" as const,
|
||||
message: "AI题库服务运行正常",
|
||||
version: SERVICE_VERSION,
|
||||
model: serverEnv.openAiModel
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user