[feature] Add emoji DELETE handler at /api/v1/admin/custom_emojis (#913)

* add emoji DELETE handler

* no need to process error (thanks kim)

* don't double check if user is admin

* add missing security annotation
This commit is contained in:
tobi
2022-10-14 17:30:04 +02:00
committed by GitHub
parent 6a95f5fa67
commit f7416d6e94
11 changed files with 369 additions and 0 deletions

View File

@ -2862,6 +2862,45 @@ paths:
tags:
- admin
/api/v1/admin/custom_emojis/{id}:
delete:
description: |-
Emoji with the given ID will no longer be available to use on the instance.
If you just want to update the emoji image instead, use the `/api/v1/admin/custom_emojis/{id}` PATCH route.
To disable emojis from **remote** instances, use the `/api/v1/admin/custom_emojis/{id}` PATCH route.
operationId: emojiDelete
parameters:
- description: The id of the emoji.
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: The deleted emoji will be returned to the caller in case further processing is necessary.
schema:
$ref: '#/definitions/adminEmoji'
"400":
description: bad request
"401":
description: unauthorized
"403":
description: forbidden
"404":
description: not found
"406":
description: not acceptable
"500":
description: internal server error
security:
- OAuth2 Bearer:
- admin
summary: Delete a **local** emoji with the given ID from the instance.
tags:
- admin
get:
operationId: emojiGet
parameters: