Update docs
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
1ee3ba5fd3
commit
45e70ca6ab
5 changed files with 77 additions and 7 deletions
|
@ -1751,3 +1751,70 @@ Note that this differs from the Mastodon API variant: Mastodon API only returns
|
|||
```json
|
||||
{}
|
||||
```
|
||||
|
||||
## `GET /api/v1/pleroma/admin/domains`
|
||||
|
||||
### List of domains
|
||||
|
||||
- Response: JSON, list of domains
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"id": "1",
|
||||
"domain": "example.org",
|
||||
"public": false,
|
||||
"resolves": true,
|
||||
"last_checked_at": "2023-11-17T12:13:05"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
## `POST /api/v1/pleroma/admin/domains`
|
||||
|
||||
### Create a domain
|
||||
|
||||
- Params:
|
||||
- `domain`: string, required, domain name
|
||||
- `public`: boolean, optional, defaults to false, whether it is possible to register an account under the domain by everyone
|
||||
|
||||
- Response: JSON, created announcement
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "1",
|
||||
"domain": "example.org",
|
||||
"public": true,
|
||||
"resolves": false,
|
||||
"last_checked_at": null
|
||||
}
|
||||
```
|
||||
|
||||
## `POST /api/v1/pleroma/admin/domains/:id`
|
||||
|
||||
### Change domain publicity
|
||||
|
||||
- Params:
|
||||
- `public`: boolean, whether it is possible to register an account under the domain by everyone
|
||||
|
||||
- Response: JSON, updated domain
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "1",
|
||||
"domain": "example.org",
|
||||
"public": false,
|
||||
"resolves": true,
|
||||
"last_checked_at": "2023-11-17T12:13:05"
|
||||
}
|
||||
```
|
||||
|
||||
## `DELETE /api/v1/pleroma/admin/domains/:id`
|
||||
|
||||
### Delete a domain
|
||||
|
||||
- Response: JSON, empty object
|
||||
|
||||
```json
|
||||
{}
|
||||
```
|
||||
|
|
|
@ -298,6 +298,7 @@ Has these additional parameters (which are the same as in Pleroma-API):
|
|||
- `captcha_answer_data`: optional, contains provider-specific captcha data
|
||||
- `token`: invite token required when the registrations aren't public.
|
||||
- `language`: optional, user's preferred language for receiving emails (digest, confirmation, etc.), default to the language set in the `userLanguage` cookies or `Accept-Language` header.
|
||||
- `domain`: optional, domain id, if multitenancy is enabled.
|
||||
|
||||
## Instance
|
||||
|
||||
|
|
|
@ -141,9 +141,10 @@ test "it returns a json representation of the user with accept application/ld+js
|
|||
test "it returns a json representation of a local user domain different from host", %{
|
||||
conn: conn
|
||||
} do
|
||||
user = insert(:user, %{
|
||||
nickname: "nick@example.org"
|
||||
})
|
||||
user =
|
||||
insert(:user, %{
|
||||
nickname: "nick@example.org"
|
||||
})
|
||||
|
||||
conn =
|
||||
conn
|
||||
|
|
|
@ -41,8 +41,7 @@ test "works for ap_ids" do
|
|||
test "works for fqns with domains other than host" do
|
||||
user = insert(:user, %{nickname: "nick@example.org"})
|
||||
|
||||
{:ok, result} =
|
||||
WebFinger.webfinger("#{user.nickname})}", "XML")
|
||||
{:ok, result} = WebFinger.webfinger("#{user.nickname})}", "XML")
|
||||
|
||||
assert is_binary(result)
|
||||
end
|
||||
|
@ -50,8 +49,7 @@ test "works for fqns with domains other than host" do
|
|||
test "doesn't work for remote users" do
|
||||
user = insert(:user, %{local: false})
|
||||
|
||||
assert {:error, _} =
|
||||
WebFinger.webfinger("#{user.nickname})}", "XML")
|
||||
assert {:error, _} = WebFinger.webfinger("#{user.nickname})}", "XML")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
3
uploads/.gitignore
vendored
Normal file
3
uploads/.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
# Git will ignore everything in this directory except this file.
|
||||
*
|
||||
!.gitignore
|
Loading…
Reference in a new issue