MostActiveStocks: send background flag when triggering analyze\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -62,7 +62,7 @@ export default function MostActiveStocks() {
|
|||||||
throw new Error(data?.error || "Failed to save stock");
|
throw new Error(data?.error || "Failed to save stock");
|
||||||
}
|
}
|
||||||
// trigger analysis in background (non-blocking)
|
// 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 }));
|
setSaved((p) => ({ ...p, [symbol]: true }));
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
|
|||||||
Reference in New Issue
Block a user