Update admin/domain_blocks to include conflict response
When creating a domain block, if there is already a domain block rule for the domain, then the existing block is returned. This documents that behavior. I've also documented the `digest` property which was added in https://github.com/mastodon/mastodon/pull/29092
This commit is contained in:
parent
046da5d653
commit
c2153cd6e5
|
@ -60,6 +60,7 @@ limit
|
||||||
{
|
{
|
||||||
"id": "1",
|
"id": "1",
|
||||||
"domain": "example.com",
|
"domain": "example.com",
|
||||||
|
"digest": "a379a6f6eeafb9a55e378c118034e2751e682fab9f2d30ab13d2125586ce1947",
|
||||||
"created_at": "2022-11-16T08:15:34.238Z",
|
"created_at": "2022-11-16T08:15:34.238Z",
|
||||||
"severity": "noop",
|
"severity": "noop",
|
||||||
"reject_media": false,
|
"reject_media": false,
|
||||||
|
@ -120,6 +121,7 @@ Authorization
|
||||||
{
|
{
|
||||||
"id": "1",
|
"id": "1",
|
||||||
"domain": "example.com",
|
"domain": "example.com",
|
||||||
|
"digest": "a379a6f6eeafb9a55e378c118034e2751e682fab9f2d30ab13d2125586ce1947",
|
||||||
"created_at": "2022-11-16T08:15:34.238Z",
|
"created_at": "2022-11-16T08:15:34.238Z",
|
||||||
"severity": "noop",
|
"severity": "noop",
|
||||||
"reject_media": false,
|
"reject_media": false,
|
||||||
|
@ -205,6 +207,7 @@ Domain has been blocked from federating.
|
||||||
{
|
{
|
||||||
"id": "1",
|
"id": "1",
|
||||||
"domain": "example.com",
|
"domain": "example.com",
|
||||||
|
"digest": "a379a6f6eeafb9a55e378c118034e2751e682fab9f2d30ab13d2125586ce1947",
|
||||||
"created_at": "2022-11-16T08:15:34.238Z",
|
"created_at": "2022-11-16T08:15:34.238Z",
|
||||||
"severity": "noop",
|
"severity": "noop",
|
||||||
"reject_media": false,
|
"reject_media": false,
|
||||||
|
@ -225,7 +228,7 @@ Authorized user is not allowed to perform this action, or invalid or missing Aut
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
##### 422: Unprocessable entity
|
##### 422: Unprocessable entity - Missing Parameter
|
||||||
|
|
||||||
The domain parameter was not provided
|
The domain parameter was not provided
|
||||||
|
|
||||||
|
@ -235,6 +238,28 @@ The domain parameter was not provided
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
##### 422: Unprocessable entity - Existing Domain Block
|
||||||
|
|
||||||
|
The domain parameter already is covered by an existing domain block.
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"error": "You have already imposed stricter limits on example.com."
|
||||||
|
"existing_domain_block": {
|
||||||
|
"id": "1",
|
||||||
|
"domain": "example.com",
|
||||||
|
"digest": "a379a6f6eeafb9a55e378c118034e2751e682fab9f2d30ab13d2125586ce1947",
|
||||||
|
"created_at": "2022-11-16T08:15:34.238Z",
|
||||||
|
"severity": "noop",
|
||||||
|
"reject_media": false,
|
||||||
|
"reject_reports": false,
|
||||||
|
"private_comment": null,
|
||||||
|
"public_comment": null,
|
||||||
|
"obfuscate": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Update a domain block {#update}
|
## Update a domain block {#update}
|
||||||
|
@ -292,6 +317,7 @@ Domain block has been updated
|
||||||
{
|
{
|
||||||
"id": "1",
|
"id": "1",
|
||||||
"domain": "example.com",
|
"domain": "example.com",
|
||||||
|
"digest": "a379a6f6eeafb9a55e378c118034e2751e682fab9f2d30ab13d2125586ce1947",
|
||||||
"created_at": "2022-11-16T08:15:34.238Z",
|
"created_at": "2022-11-16T08:15:34.238Z",
|
||||||
"severity": "noop",
|
"severity": "noop",
|
||||||
"reject_media": false,
|
"reject_media": false,
|
||||||
|
|
Loading…
Reference in New Issue