fix: add /change-email route in index.ts + fix SQL query escaping in keys.ts
All checks were successful
Deploy to Production / Deploy to Server (push) Successful in 1m36s

- Register GET /change-email route in src/index.ts (serves change-email.html)
- Fix updateKeyEmail() SQL query string (dollar signs were stripped by heredoc)
- Fix updateEmailByCustomer() SQL query string
- Rebuild TypeScript dist/
This commit is contained in:
DocFast Bot 2026-02-17 11:34:21 +00:00
parent 8f3b1a9660
commit 1702abdeb8
9 changed files with 172 additions and 95 deletions

View file

@ -134,6 +134,6 @@ export async function updateEmailByCustomer(stripeCustomerId: string, newEmail:
const entry = keysCache.find(k => k.stripeCustomerId === stripeCustomerId);
if (!entry) return false;
entry.email = newEmail;
await pool.query(UPDATE api_keys SET email = $1 WHERE stripe_customer_id = $2, [newEmail, stripeCustomerId]);
await pool.query("UPDATE api_keys SET email = $1 WHERE stripe_customer_id = $2", [newEmail, stripeCustomerId]);
return true;
}