Skip to content

Fix digest unsubscribe API URL fallback - #1170

Merged
nanaf6203-bit merged 1 commit into
MettaChain:mainfrom
DeFex-lab:fix/1090-digest-unsubscribe-url
Sep 1, 2026
Merged

Fix digest unsubscribe API URL fallback#1170
nanaf6203-bit merged 1 commit into
MettaChain:mainfrom
DeFex-lab:fix/1090-digest-unsubscribe-url

Conversation

@DeFex-lab

Copy link
Copy Markdown
Contributor

Overview

Fixes digest unsubscribe links so they no longer silently fall back to http://localhost:3000/api when API_URL is unset.

Related Issue

Closes #1090

Changes

  • Removed the default localhost fallback from EmailDigestService.sendDigestForUser.
  • Added an explicit configuration failure when API_URL is missing.
  • Added email digest tests for configured unsubscribe URLs and missing API_URL.

Verification Results

  • npm ci - passed
  • npm test -- src/email-digest/email-digest.service.spec.ts --runInBand - passed
  • node_modules\.bin\jest.cmd src/email-digest/email-digest.service.spec.ts --runInBand - passed
  • node_modules\.bin\eslint.cmd src\email-digest\email-digest.service.ts src\email-digest\email-digest.service.spec.ts - passed
  • git diff --check - passed
  • npm test -- --runInBand - timed out after 5 minutes with no usable output
  • node_modules\.bin\nest.cmd build - failed on existing unrelated TypeScript errors outside this change, including src/sessions/sessions.service.ts and src/versioning/deprecation-warning.interceptor.spec.ts

Acceptance Criteria

Criteria Status
Digest unsubscribe links never contain localhost unless explicitly configured Met
Missing API_URL no longer creates a dead localhost URL Met
Configured digest link points at the configured API host Met

@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@DeFex-lab Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@nanaf6203-bit
nanaf6203-bit merged commit 88ddc40 into MettaChain:main Sep 1, 2026
4 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants