fix: use frontend_url for user-facing registration links #196

Merged
forgejo_admin merged 1 commit from 105-fix-base-url-to-frontend-url-in-emails into main 2026-03-28 00:07:42 +00:00

Summary

  • Email confirmation links and admin dashboard copy-link buttons pointed to the API host (base_url) instead of the frontend app (frontend_url)
  • Parents clicking registration links landed on the API server instead of the registration page
  • Fixed both user-facing URL constructions to use settings.frontend_url

Changes

  • src/basketball_api/services/email.py line 83: changed settings.base_url to settings.frontend_url in registration email link
  • src/basketball_api/routes/tryouts.py line 795: changed settings.base_url to settings.frontend_url in admin dashboard copy-link button
  • Not changed: tryouts.py:509 (photo_url) intentionally uses base_url — MinIO photo URL served by the API

Test Plan

  • Tests pass locally (376 pass; 1 pre-existing failure in test_reconciliation.py due to missing groupme_sdk — same on main)
  • Verify registration email links point to westsidekingsandqueens.tail5b443a.ts.net
  • Verify admin dashboard "Copy Link" buttons produce frontend URLs
  • No regressions in Stripe callbacks or internal API references

Review Checklist

  • Passed automated review-fix loop
  • No secrets committed
  • No unnecessary file changes
  • Commit messages are descriptive
  • Closes #105
  • PR #104 introduced frontend_url config; this fixes the remaining base_url usages
  • plan-wkq Phase 11 discovered scope
## Summary - Email confirmation links and admin dashboard copy-link buttons pointed to the API host (`base_url`) instead of the frontend app (`frontend_url`) - Parents clicking registration links landed on the API server instead of the registration page - Fixed both user-facing URL constructions to use `settings.frontend_url` ## Changes - `src/basketball_api/services/email.py` line 83: changed `settings.base_url` to `settings.frontend_url` in registration email link - `src/basketball_api/routes/tryouts.py` line 795: changed `settings.base_url` to `settings.frontend_url` in admin dashboard copy-link button - **Not changed:** `tryouts.py:509` (`photo_url`) intentionally uses `base_url` — MinIO photo URL served by the API ## Test Plan - [x] Tests pass locally (376 pass; 1 pre-existing failure in `test_reconciliation.py` due to missing `groupme_sdk` — same on main) - [ ] Verify registration email links point to `westsidekingsandqueens.tail5b443a.ts.net` - [ ] Verify admin dashboard "Copy Link" buttons produce frontend URLs - [x] No regressions in Stripe callbacks or internal API references ## Review Checklist - [x] Passed automated review-fix loop - [x] No secrets committed - [x] No unnecessary file changes - [x] Commit messages are descriptive ## Related Notes - Closes #105 - PR #104 introduced `frontend_url` config; this fixes the remaining `base_url` usages - `plan-wkq` Phase 11 discovered scope
fix: use frontend_url for user-facing registration links
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
26f2eb84a7
Email confirmation links and admin dashboard copy-link buttons were
pointing to the API host (base_url) instead of the frontend app
(frontend_url). Parents clicking these links would land on the API
server instead of the registration page.

Closes #105

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Owner

QA Review -- PR #196

Diff Audit

  • email.py:83 -- settings.base_url correctly changed to settings.frontend_url for the registration email link. This is a user-facing URL that parents click in their email.
  • tryouts.py:795 -- settings.base_url correctly changed to settings.frontend_url for the admin dashboard "Copy Link" button. This URL is copied and sent to parents for registration.
  • tryouts.py:509 -- Correctly left as settings.base_url. This is a MinIO photo URL served by the API, not a user-facing navigation link.

Scope Check

  • Only 2 files changed, 4 additions, 2 deletions. Minimal and focused.
  • No other settings.base_url usages in the codebase are user-facing registration links (remaining usages in admin.py and coach_onboarding.py are API-internal).
  • No secrets, no unnecessary file changes.

Test Verification

  • 376 tests pass. 1 pre-existing failure (test_reconciliation.py -- missing groupme_sdk module) confirmed on main as well.
  • No test regressions introduced by this change.

Nits

None.

VERDICT: APPROVE

## QA Review -- PR #196 ### Diff Audit - **email.py:83** -- `settings.base_url` correctly changed to `settings.frontend_url` for the registration email link. This is a user-facing URL that parents click in their email. - **tryouts.py:795** -- `settings.base_url` correctly changed to `settings.frontend_url` for the admin dashboard "Copy Link" button. This URL is copied and sent to parents for registration. - **tryouts.py:509** -- Correctly left as `settings.base_url`. This is a MinIO photo URL served by the API, not a user-facing navigation link. ### Scope Check - Only 2 files changed, 4 additions, 2 deletions. Minimal and focused. - No other `settings.base_url` usages in the codebase are user-facing registration links (remaining usages in `admin.py` and `coach_onboarding.py` are API-internal). - No secrets, no unnecessary file changes. ### Test Verification - 376 tests pass. 1 pre-existing failure (`test_reconciliation.py` -- missing `groupme_sdk` module) confirmed on main as well. - No test regressions introduced by this change. ### Nits None. **VERDICT: APPROVE**
forgejo_admin deleted branch 105-fix-base-url-to-frontend-url-in-emails 2026-03-28 00:07:42 +00:00
Sign in to join this conversation.
No description provided.