Point SHORTENER_BASE_URL at piha.lc / beta.piha.li instead of a separate API host.
CI / test (pull_request) Successful in 21s
CI / test (pull_request) Successful in 21s
Closes #11.
This commit is contained in:
@@ -50,7 +50,7 @@ long HTTPS URL to `url_shortening_service` (`POST /api/links/`, Bearer
|
||||
`monica:<secret>`) and puts `short_url` (`https://piha.li/<code>`) in SMS,
|
||||
email hrefs, and postcard QR codes. Empty env → long UTM URL (local default).
|
||||
|
||||
Mint against the **API host**, not `piha.li`. See `.env.example` / `.env.prod.example`.
|
||||
Mint against the short host (`https://piha.lc` / `https://beta.piha.li`). See `.env.example` / `.env.prod.example`.
|
||||
|
||||
SMS correlation uses `message_id` (SMS id), then `destination_number` phone
|
||||
fallback. Do **not** treat webhook `id` as the SMS id.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"""Server-to-server client for url_shortening_service (piha.li).
|
||||
"""Server-to-server client for url_shortening_service (piha.lc).
|
||||
|
||||
Call the API host (`SHORTENER_BASE_URL`), never the public short domain.
|
||||
Call SHORTENER_BASE_URL (https://piha.lc / https://beta.piha.li).
|
||||
Auth: Authorization: Bearer <SHORTENER_API_TOKEN> (name:secret).
|
||||
"""
|
||||
|
||||
|
||||
@@ -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