feat: 移除公开触发AI分析接口,仅管理面板可用
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user