diff options
author | Alex Gleason <alex@alexgleason.me> | 2021-12-27 18:01:25 -0600 |
---|---|---|
committer | Alex Gleason <alex@alexgleason.me> | 2021-12-27 18:01:25 -0600 |
commit | f5c3d45120364681b3601baa36a0ce9fa22680d7 (patch) | |
tree | 5f1379ca293a001111585849521615d69880b7cb /lib/pleroma/web/api_spec/operations/admin | |
parent | 3117c6099733207b7f2a777f8cb8b5b3b839ebe8 (diff) | |
parent | 264f0fde1b9f0cbaf7679eeb59938eb9ca653779 (diff) | |
download | pleroma-f5c3d45120364681b3601baa36a0ce9fa22680d7.tar.gz pleroma-f5c3d45120364681b3601baa36a0ce9fa22680d7.zip |
Merge remote-tracking branch 'origin/develop' into apps-api-endpoint
Diffstat (limited to 'lib/pleroma/web/api_spec/operations/admin')
-rw-r--r-- | lib/pleroma/web/api_spec/operations/admin/user_operation.ex | 66 |
1 files changed, 65 insertions, 1 deletions
diff --git a/lib/pleroma/web/api_spec/operations/admin/user_operation.ex b/lib/pleroma/web/api_spec/operations/admin/user_operation.ex index c9d0bfd7c..57fb1ad65 100644 --- a/lib/pleroma/web/api_spec/operations/admin/user_operation.ex +++ b/lib/pleroma/web/api_spec/operations/admin/user_operation.ex @@ -216,7 +216,71 @@ defmodule Pleroma.Web.ApiSpec.Admin.UserOperation do request_body( "Parameters", %Schema{ - description: "POST body for deleting multiple users", + description: "POST body for approving multiple users", + type: :object, + properties: %{ + nicknames: %Schema{ + type: :array, + items: %Schema{type: :string} + } + } + } + ), + responses: %{ + 200 => + Operation.response("Response", "application/json", %Schema{ + type: :object, + properties: %{user: %Schema{type: :array, items: user()}} + }), + 403 => Operation.response("Forbidden", "application/json", ApiError) + } + } + end + + def suggest_operation do + %Operation{ + tags: ["User administration"], + summary: "Suggest multiple users", + operationId: "AdminAPI.UserController.suggest", + security: [%{"oAuth" => ["admin:write:accounts"]}], + parameters: admin_api_params(), + requestBody: + request_body( + "Parameters", + %Schema{ + description: "POST body for adding multiple suggested users", + type: :object, + properties: %{ + nicknames: %Schema{ + type: :array, + items: %Schema{type: :string} + } + } + } + ), + responses: %{ + 200 => + Operation.response("Response", "application/json", %Schema{ + type: :object, + properties: %{user: %Schema{type: :array, items: user()}} + }), + 403 => Operation.response("Forbidden", "application/json", ApiError) + } + } + end + + def unsuggest_operation do + %Operation{ + tags: ["User administration"], + summary: "Unsuggest multiple users", + operationId: "AdminAPI.UserController.unsuggest", + security: [%{"oAuth" => ["admin:write:accounts"]}], + parameters: admin_api_params(), + requestBody: + request_body( + "Parameters", + %Schema{ + description: "POST body for removing multiple suggested users", type: :object, properties: %{ nicknames: %Schema{ |