diff options
author | Alex Gleason <alex@alexgleason.me> | 2021-12-25 19:57:53 -0600 |
---|---|---|
committer | Alex Gleason <alex@alexgleason.me> | 2021-12-25 19:57:53 -0600 |
commit | db2bf55e9bb31af2ed34805ca7fa98ce67b471b1 (patch) | |
tree | f532711eaf19111e22375e87706edf5a3024e5b5 /lib/pleroma/web/api_spec/operations/admin | |
parent | b15c4629ff3093353ac5e37d381db1cdc4da1c3a (diff) | |
parent | 73609211a425922a5068d3912a36b82abe24e12c (diff) | |
download | pleroma-db2bf55e9bb31af2ed34805ca7fa98ce67b471b1.tar.gz pleroma-db2bf55e9bb31af2ed34805ca7fa98ce67b471b1.zip |
Merge remote-tracking branch 'origin/develop' into notice-routes
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{ |