feat(api): Add TOS and Privacy Policy support

This commit is contained in:
Jesse Wierzbinski 2024-06-11 09:55:40 -10:00
parent e9e33432c2
commit ffcf01e3cd
No known key found for this signature in database
12 changed files with 180 additions and 33 deletions

View file

@ -25,4 +25,8 @@ For frontend developers. Please read [the documentation](./frontend.md).
## Mastodon API Extensions
Extra attributes have been added to some Mastodon API routes. Those changes are [documented in this document](./mastodon.md)
Extra attributes have been added to some Mastodon API routes. Those changes are [documented in this document](./mastodon.md)
## Instance API
Extra endpoints have been added to the API to provide additional information about the instance. Please read [the documentation](./instance.md).

11
docs/api/instance.md Normal file
View file

@ -0,0 +1,11 @@
# Instance Endpoints
Extra endpoints have been added to the API to provide additional information about the instance.
## `/api/v1/instance/tos`
Returns the same output as Mastodon's `/api/v1/instance/extended_description`, but with the instance's Terms of Service. Configurable at `instance.tos_path` in config.
## `/api/v1/instance/privacy_policy`
Returns the same output as Mastodon's `/api/v1/instance/extended_description`, but with the instance's Privacy Policy. Configurable at `instance.privacy_policy_path` in config.

View file

@ -30,7 +30,7 @@ The URL of the instance's banner image. `null` if there is no banner set.
The version of the Lysand instance.
The normal `version` field is always set to `"4.3.0+glitch"` or similar to not confuse clients that expect a Mastodon instance.
The normal `version` field is always set to `"4.3.0+glitch"` or similar, to not confuse clients that expect a Mastodon instance.
### `sso`