MostActiveStocks: send background flag when triggering analyze\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

This commit is contained in:
2026-05-16 14:19:45 +02:00
parent a9e73e8e0b
commit eee375ff56
+1 -1
View File
@@ -62,7 +62,7 @@ export default function MostActiveStocks() {
throw new Error(data?.error || "Failed to save stock");
}
// trigger analysis in background (non-blocking)
fetch(`/api/analyze`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ ticker: symbol }) }).catch(() => {});
fetch(`/api/analyze`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ ticker: symbol, background: true }) }).catch(() => {});
setSaved((p) => ({ ...p, [symbol]: true }));
} catch (err) {
console.error(err);