Skip to content

Commit

Permalink
avoid hardcoding account url
Browse files Browse the repository at this point in the history
  • Loading branch information
devxpy committed Feb 27, 2024
1 parent 8f05504 commit 8ac0e71
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion routers/billing.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ def account(request: Request):
"user_credits": request.user.balance,
"subscription": get_user_subscription(request.user),
"is_admin": is_admin,
"canonical_url": str(furl(settings.APP_BASE_URL) / "account" / "/"),
"canonical_url": str(
furl(settings.APP_BASE_URL) / router.url_path_for(account.__name__)
),
}

return templates.TemplateResponse("account.html", context)
Expand Down

0 comments on commit 8ac0e71

Please sign in to comment.