docfast/src/routes
DocFast Bot 855068a011
All checks were successful
Deploy to Production / Deploy to Server (push) Successful in 2m43s
fix: downgrade instead of delete key on subscription cancel
- Replace revokeByCustomer with downgradeByCustomer in keys.ts
  - Sets tier='free' in cache and DB (UPDATE, not DELETE)
- Add isDocFastSubscription() product filter helper in billing.ts
  - Filters all subscription events by prod_TygeG8tQPtEAdE
- Handle customer.subscription.updated event
  - Downgrades on status=canceled/past_due/unpaid or cancel_at_period_end=true
- Handle customer.subscription.deleted with product filter
  - Downgrades to free (was incorrectly deleting the key)

Fixes revenue integrity bug: cancelled Pro subscribers kept Pro access.
2026-02-17 10:46:12 +00:00
..
billing.ts fix: downgrade instead of delete key on subscription cancel 2026-02-17 10:46:12 +00:00
convert.ts fix: audit #18 rate limit cleanup (.unref), audit #25 consistent error shapes 2026-02-17 08:10:14 +00:00
email-change.ts Backend hardening: structured logging, timeouts, memory leak fixes, compression, XSS fix 2026-02-16 08:27:42 +00:00
health.ts Backend hardening: structured logging, timeouts, memory leak fixes, compression, XSS fix 2026-02-16 08:27:42 +00:00
health.ts.backup Update backup system and local changes 2026-02-15 11:04:58 +00:00
recover.ts Backend hardening: structured logging, timeouts, memory leak fixes, compression, XSS fix 2026-02-16 08:27:42 +00:00
signup.ts fix: audit #18 rate limit cleanup (.unref), audit #25 consistent error shapes 2026-02-17 08:10:14 +00:00
templates.ts Session 45: support email, audit fixes (template validation, content-type, admin auth, waitUntil) 2026-02-16 19:30:21 +00:00