Skip to content

Commit

Permalink
Use route helper to build CRM URL
Browse files Browse the repository at this point in the history
  • Loading branch information
zoldar committed Jul 12, 2024
1 parent 676d62c commit 18aad23
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion extra/lib/plausible/help_scout.ex
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ defmodule Plausible.HelpScout do
alias Plausible.HelpScout.Vault
alias Plausible.Repo

alias PlausibleWeb.Router.Helpers, as: Routes

require Plausible.Billing.Subscription.Status

@base_api_url "https://api.helpscout.net"
Expand Down Expand Up @@ -73,7 +75,8 @@ defmodule Plausible.HelpScout do
{:ok,
%{
status_label: status_label(user),
status_link: PlausibleWeb.Endpoint.url() <> "/crm/auth/user/#{user.id}",
status_link:
Routes.kaffy_resource_url(PlausibleWeb.Endpoint, :show, :auth, :user, user.id),
plan_label: plan_label(user.subscription, plan),
plan_link: plan_link(user.subscription)
}}
Expand Down

0 comments on commit 18aad23

Please sign in to comment.