diff --git a/app.js b/app.js index 9c73f53..2cec577 100644 --- a/app.js +++ b/app.js @@ -129,9 +129,9 @@ ai += `This would represent entirely new interest income for your community at no additional risk.`; } - // ── AI recommendation — call server; fall back to client-side text ── + // ── AI recommendation — call server to generate & save to DB (not displayed) ── try { - const aiRes = await fetch('/api/calculate', { + await fetch('/api/calculate', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ @@ -140,15 +140,7 @@ totalPotential, opInterest, resInterest, }), }); - if (aiRes.ok) { - const { recommendation } = await aiRes.json(); - document.getElementById('calcAiText').textContent = recommendation; - } else { - document.getElementById('calcAiText').textContent = ai; - } - } catch (_) { - document.getElementById('calcAiText').textContent = ai; - } + } catch (_) { /* best-effort — DB save failed silently */ } // ── Animate the main number ── animateValue(document.getElementById('resultAmount'), 0, totalPotential); diff --git a/index.html b/index.html index 5d96657..374cae8 100644 --- a/index.html +++ b/index.html @@ -532,10 +532,8 @@ -