diff --git a/app.js b/app.js index d2e0b13..b01af7a 100644 --- a/app.js +++ b/app.js @@ -22,7 +22,7 @@ const REFERRAL_URL = `${API_BASE}/etc/referral`; // POST {referrer,friend_name,f // WIZZARD=false is written via AGENT_INFO_URL (POST { uuid, key, value }) const CREDITS_URL = `${API_BASE}/payment/credits`; // hidden form POST → 302 Stripe redirect const INVOICES_URL = `${API_BASE}/invoices`; // GET ?email= -const INVOICE_EMAIL_URL = `${API_BASE}/account/invoice-email`; // POST {email, invoice_email} +const INVOICE_EMAIL_URL = `${API_BASE}/user`; // POST {email, invoice_email} const CONTRACT_EXTEND_URL = "https://derez.ai"; // ← replace with Stripe payment link const CONTRACT_CANCEL_URL = "https://derez.ai"; // ← replace with Stripe cancellation link @@ -1122,15 +1122,28 @@ async function saveInvoiceEmail() { async function loadInvoices() { const body = document.getElementById("invoices-body"); + if (!body) return; body.innerHTML = '
Could not load invoices.
'; }