Mint short links on piha.lc / beta.piha.li (#12)
## Summary - Point `SHORTENER_BASE_URL` at `https://piha.lc` (prod) and `https://beta.piha.li` (beta). - Stop documenting `shortener.aimloperations.com` as the mint host. Closes #11. Depends on url_shortening_service serving `/api/` on the short host. ## Test plan - [ ] Set `SHORTENER_BASE_URL=https://beta.piha.li` and matching token in beta env - [ ] Compose a campaign SMS and confirm mint hits beta.piha.li (not shortener-beta) - [ ] Body contains `https://beta.piha.li/<code>` Reviewed-on: #12
This commit was merged in pull request #12.
This commit is contained in:
@@ -1598,7 +1598,7 @@ class CampaignUtmLinkTests(TestCase):
|
||||
}
|
||||
with self.settings(
|
||||
PUBLIC_SITE_URL="https://mkdrealtor.com",
|
||||
SHORTENER_BASE_URL="https://shortener.aimloperations.com",
|
||||
SHORTENER_BASE_URL="https://piha.lc",
|
||||
SHORTENER_API_TOKEN="monica:test-token",
|
||||
):
|
||||
with patch(
|
||||
@@ -1630,7 +1630,7 @@ class CampaignUtmLinkTests(TestCase):
|
||||
mock.text = '{"detail":"Unauthorized"}'
|
||||
with self.settings(
|
||||
PUBLIC_SITE_URL="https://mkdrealtor.com",
|
||||
SHORTENER_BASE_URL="https://shortener.aimloperations.com",
|
||||
SHORTENER_BASE_URL="https://piha.lc",
|
||||
SHORTENER_API_TOKEN="monica:bad",
|
||||
):
|
||||
with patch("messaging.shortener.requests.post", return_value=mock):
|
||||
@@ -1687,7 +1687,7 @@ class CampaignUtmLinkTests(TestCase):
|
||||
url = reverse("messaging:campaign_short_link")
|
||||
with self.settings(
|
||||
PUBLIC_SITE_URL="https://mkdrealtor.com",
|
||||
SHORTENER_BASE_URL="https://shortener.aimloperations.com",
|
||||
SHORTENER_BASE_URL="https://piha.lc",
|
||||
SHORTENER_API_TOKEN="monica:test-token",
|
||||
):
|
||||
with patch("messaging.shortener.requests.post", return_value=mock):
|
||||
|
||||
Reference in New Issue
Block a user