From 55ad6dee716112e1a6c95cd53af0680ab3e8679a Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Sat, 19 Mar 2022 12:01:40 +0100 Subject: [feature] Admin account actions (#432) * add accountAction to the admin API * model admin account action * add admin account action to the processor * add migration for new AdminAccountActions table * fix accounts admin path * Update swagger docs --- docs/api/swagger.yaml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'docs/api') diff --git a/docs/api/swagger.yaml b/docs/api/swagger.yaml index 2e514e414..19b49489e 100644 --- a/docs/api/swagger.yaml +++ b/docs/api/swagger.yaml @@ -2336,6 +2336,43 @@ paths: summary: Verify a token by returning account details pertaining to it. tags: - accounts + /api/v1/admin/accounts/{id}/action: + post: + consumes: + - multipart/form-data + operationId: adminAccountAction + parameters: + - description: ID of the account. + in: path + name: id + required: true + type: string + - description: 'Type of action to be taken. One of: disable, silence, suspend.' + in: formData + name: type + required: true + type: string + - description: Optional text describing why this action was taken. + in: formData + name: text + type: string + produces: + - application/json + responses: + "200": + description: OK + "400": + description: bad request + "401": + description: unauthorized + "403": + description: forbidden + security: + - OAuth2 Bearer: + - admin + summary: Perform an admin action on an account. + tags: + - admin /api/v1/admin/custom_emojis: post: consumes: -- cgit v1.2.3