Skip to content

Commit 5dbc164

Browse files
Backend/emails: Link to terms of service (#9243)
1 parent e7fa44b commit 5dbc164

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

app/backend/src/couchers/email/emails.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def get_body_blocks(self, loc_context: LocalizationContext) -> list[EmailBlock]:
204204
builder.quote(self.api_key, markdown=False)
205205
builder.para(".expiry", {"datetime": loc_context.localize_datetime(self.expiry)})
206206
builder.para(".usage_warning")
207-
builder.para(".policy_warning")
207+
builder.para(".policy_warning", {"terms_url": urls.terms_of_service_url()})
208208
return builder.build()
209209

210210
@classmethod

app/backend/src/couchers/email/locales/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
"header": "You recently requested an API key for Couchers.org. We've issued you with the following API key:",
7272
"expiry": "The key expires on <b>{{ datetime }}</b>.",
7373
"usage_warning": "This API key is unique to your account; do not share it with anyone. It gives complete access to your account, and you are reponsible for any actions taken using this API key.",
74-
"policy_warning": "Please remember to abide by our Terms of Service, our Community Guidelines, and other policies while using our APIs. All access is logged and analyzed, and we may terminate your access or account if you abuse the service."
74+
"policy_warning": "Please remember to abide by our <a href=\"{{terms_url}}\">Terms of Service</a>, our Community Guidelines, and other policies while using our APIs. All access is logged and analyzed, and we may terminate your access or account if you abuse the service."
7575
},
7676
"badges": {
7777
"added": {

app/backend/src/couchers/urls.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,3 +160,7 @@ def invite_code_link(*, code: str) -> str:
160160

161161
def postal_verification_link(*, code: str) -> str:
162162
return f"{config.BASE_URL}/verify-postal?c={code}"
163+
164+
165+
def terms_of_service_url() -> str:
166+
return f"{config.BASE_URL}/terms"

0 commit comments

Comments
 (0)