diff options
author | marcin mikołajczak <git@mkljczk.pl> | 2021-12-28 18:07:19 +0100 |
---|---|---|
committer | marcin mikołajczak <git@mkljczk.pl> | 2021-12-28 18:07:19 +0100 |
commit | 9032d065e6710400420320edbee9a9ca5e490eae (patch) | |
tree | d49601451ea29dcf2a79a948541ddf5790e389f5 /lib/pleroma/web/api_spec/operations/admin | |
parent | a9b0027071e3edf4d6a899ae5772e37806b4fc7d (diff) | |
parent | de7f84deb3ebe57744630950860f8fbf64a414a2 (diff) | |
download | pleroma-9032d065e6710400420320edbee9a9ca5e490eae.tar.gz pleroma-9032d065e6710400420320edbee9a9ca5e490eae.zip |
wip
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
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{ |