Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/backend/src/couchers/email/emails.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def get_body_blocks(self, loc_context: LocalizationContext) -> list[EmailBlock]:
builder.quote(self.api_key, markdown=False)
builder.para(".expiry", {"datetime": loc_context.localize_datetime(self.expiry)})
builder.para(".usage_warning")
builder.para(".policy_warning")
builder.para(".policy_warning", {"terms_url": urls.terms_of_service_url()})
return builder.build()

@classmethod
Expand Down
2 changes: 1 addition & 1 deletion app/backend/src/couchers/email/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"header": "You recently requested an API key for Couchers.org. We've issued you with the following API key:",
"expiry": "The key expires on <b>{{ datetime }}</b>.",
"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.",
"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."
"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."
},
"badges": {
"added": {
Expand Down
4 changes: 4 additions & 0 deletions app/backend/src/couchers/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,7 @@ def invite_code_link(*, code: str) -> str:

def postal_verification_link(*, code: str) -> str:
return f"{config.BASE_URL}/verify-postal?c={code}"


def terms_of_service_url() -> str:
return f"{config.BASE_URL}/terms"
Loading