feat: 移除公开触发AI分析接口,仅管理面板可用

This commit is contained in:
Sakurasan
2026-09-01 19:16:09 +08:00
parent 45fe244330
commit 317ea483d0
2 changed files with 0 additions and 20 deletions
-10
View File
@@ -45,16 +45,6 @@ export async function checkAiReport(tradeDate: string): Promise<boolean> {
return result.data?.hasReport || false;
}
export async function triggerAiAnalysis(): Promise<{ id: number; tokens_used: number }> {
const resp = await fetch(`${API_BASE}/api/ai-analysis/trigger`, { method: "POST" });
if (!resp.ok) {
const err = await resp.json().catch(() => ({}));
throw new Error(err.detail || "触发失败");
}
const result = await resp.json();
return result.data;
}
export async function regenerateAiReport(id: number): Promise<{ id: number; tokens_used: number }> {
const resp = await fetch(`${API_BASE}/api/ai-analysis/${id}/regenerate`, { method: "POST" });
if (!resp.ok) {