Test

Merged
SW
4mo ago
+1-599

Summary by cubic

Replaced /api/notifications with a smarter /api/emails endpoint. You can now omit to and subject — we’ll fill them in for you.

  • New Features

    • to is optional. Defaults to the authenticated account’s email(s); 400 if none on file.
    • subject is optional. Derived from the first heading/line of text (or stripped html), else "Message from Recoup".
    • Recipient restriction enforced during validation (limits to/cc without a payment method).
    • Added firstMeaningfulLine, stripHtml, and resolveEmailSubject with unit tests.
  • Migration

    • Move calls from /api/notifications to /api/emails (old route removed). You can omit to to “email me this,” and omit subject to auto-derive it.