diff options
author | Alex Gleason <alex@alexgleason.me> | 2021-12-19 11:33:10 -0600 |
---|---|---|
committer | Alex Gleason <alex@alexgleason.me> | 2021-12-19 11:33:10 -0600 |
commit | e4f9cb1c1b3969164c03a219d5a760df07d2b3cd (patch) | |
tree | d9549feae7691be9988106f2a92ea387b3fdeaf2 /lib/pleroma/web/api_spec/operations/admin | |
parent | 720198d56950ca98f4d947dd630b0e170eda569b (diff) | |
parent | bd853199d93e03fedf43397455939c6d633fa36b (diff) | |
download | pleroma-e4f9cb1c1b3969164c03a219d5a760df07d2b3cd.tar.gz pleroma-e4f9cb1c1b3969164c03a219d5a760df07d2b3cd.zip |
Merge remote-tracking branch 'origin/develop' into manifest
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{ |