From a7f6547f18b9441536bb0dde2d218dc2277a7111 Mon Sep 17 00:00:00 2001 From: rebel Date: Fri, 12 May 2023 03:06:39 +0200 Subject: [PATCH] Add doc entry --- doc/API.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/doc/API.md b/doc/API.md index 63a50a2f..6287f61d 100644 --- a/doc/API.md +++ b/doc/API.md @@ -39,6 +39,7 @@ - [Getting post](#getting-post) - [Getting around post](#getting-around-post) - [Deleting post](#deleting-post) + - [Banning post](#banning-post) - [Merging posts](#merging-posts) - [Rating post](#rating-post) - [Adding post to favorites](#adding-post-to-favorites) @@ -1004,6 +1005,40 @@ data. Deletes existing post. Related posts and tags are kept. + +## Banning post +- **Request** + + `POST /post-ban/` + +- **Input** + + ```json5 + { + "version": + } + ``` + +- **Output** + + ```json5 + {} + ``` + +- **Errors** + + - the version is outdated + - the post does not exist + - privileges are too low + +- **Description** + + Deletes existing post, then adds the sha1sum of the post file to a ban list. + Users will not be able to upload the file again. + + Related posts and tags are kept. + + ## Merging posts - **Request**