feat: 接口统一优化

This commit is contained in:
2026-05-23 13:45:58 +08:00
parent a3b1fba3ea
commit 7d68db723b
20 changed files with 302 additions and 302 deletions
+3 -2
View File
@@ -1,5 +1,6 @@
// app/services/answer_service.ts - OCS AI 答题服务相关 API
import type {
IApiResponse,
IClearCacheResponse,
IHealthResponse,
IRecordsRequest,
@@ -27,14 +28,14 @@ export class AnswerService {
/** 读取健康状态;无需 token */
public static getHealth() {
return BaseClientService.get<IHealthResponse>(
return BaseClientService.get<IApiResponse<IHealthResponse>>(
`${AnswerService.basePath}/health`
);
}
/** 读取运行统计(需登录) */
public static getStats() {
return BaseClientService.get<IStatsResponse>(
return BaseClientService.get<IApiResponse<IStatsResponse>>(
`${AnswerService.basePath}/stats`
);
}