Skip to content

Email digest unsubscribe links fall back to localhost:3000 when API_URL is unset #1090

Description

@nanaf6203-bit

Email digest unsubscribe links fall back to localhost:3000 when API_URL is unset

Labels / Complexity: bug · Trivial — Trivial

Summary

EmailDigestService.sendDigestForUser (src/email-digest/email-digest.service.ts) builds each digest's unsubscribe URL from this.configService.get<string>('API_URL', 'http://localhost:3000/api'). In any environment where API_URL is not configured, every digest email carries an unsubscribe link pointing at localhost:3000 — a dead link for recipients and a broken unsubscribe flow. This is a second instance of the defect class already fixed for the main email path (#1054, email.service.ts), here in the digest's own URL builder.

Proposal

Acceptance criteria

  • Digest unsubscribe links never contain localhost unless explicitly configured for local development.
  • The unsubscribe link in a sent digest reaches a working endpoint.

Getting started

Commands: npm test.

Good first files to read: src/email-digest/email-digest.service.ts, src/email/email.service.ts.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programTrivialbugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions