mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2026-02-15 17:16:57 +00:00
Allow assigning users to reports
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
parent
d6bec8b6b7
commit
80ede85f75
17 changed files with 402 additions and 7 deletions
|
|
@ -665,6 +665,7 @@ Status: 404
|
|||
- *optional* `limit`: **integer** the number of records to retrieve
|
||||
- *optional* `page`: **integer** page number
|
||||
- *optional* `page_size`: **integer** number of log entries per page (default is `50`)
|
||||
- *optional* `assigned_account`: **string** assigned account ID
|
||||
- Response:
|
||||
- On failure: 403 Forbidden error `{"error": "error_msg"}` when requested by anonymous or non-admin
|
||||
- On success: JSON, returns a list of reports, where:
|
||||
|
|
@ -749,6 +750,7 @@ Status: 404
|
|||
"url": "https://pleroma.example.org/users/lain",
|
||||
"username": "lain"
|
||||
},
|
||||
"assigned_account": null,
|
||||
"content": "Please delete it",
|
||||
"created_at": "2019-04-29T19:48:15.000Z",
|
||||
"id": "9iJGOv1j8hxuw19bcm",
|
||||
|
|
@ -868,6 +870,37 @@ Status: 404
|
|||
]
|
||||
```
|
||||
|
||||
- Response:
|
||||
- On failure:
|
||||
- 400 Bad Request, JSON:
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
`id`, // report id
|
||||
`error` // error message
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
- On success: `204`, empty response
|
||||
|
||||
## `POST /api/v1/pleroma/admin/reports/assign_account`
|
||||
|
||||
### Assign account to one or multiple reports
|
||||
|
||||
- Params:
|
||||
|
||||
```json
|
||||
`reports`: [
|
||||
{
|
||||
`id`, // required, report id
|
||||
`nickname` // account nickname, use null to unassign account
|
||||
},
|
||||
...
|
||||
]
|
||||
```
|
||||
|
||||
- Response:
|
||||
- On failure:
|
||||
- 400 Bad Request, JSON:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue