1
0
mirror of https://github.com/lus/pasty.git synced 2023-08-10 21:13:09 +03:00

Document the report webhook

This commit is contained in:
Lukas Schulte Pelkum 2021-07-23 23:37:13 +02:00
parent 9dfcd1788d
commit dd85d64c1c
No known key found for this signature in database
GPG Key ID: 408DA7CA81DB885C

5
API.md
View File

@ -173,9 +173,12 @@ POST /api/v2/pastes/{paste_id}/report
**Response:** **Response:**
```jsonc ```jsonc
{ {
"success": true, // Whether or not the report was received successfully (this is returned by the report webhook to allow custom errors)
"message": "message" // An optional message to display to the reporting user "message": "message" // An optional message to display to the reporting user
} }
``` ```
**Notes:** **Notes:**
* The endpoint is only available if the report system is enabled. Otherwise it will return a `404 Not Found` error. * The endpoint is only available if the report system is enabled. Otherwise it will return a `404 Not Found` error.
* The request for this endpoint is the exact same that will reach the webhook.
* The response from this endpoint is the exact same that pasty expects from the webhook.